
// SWIGFUSION ^.^
    
// Lua
struct lua_State;

// Forward declarations of fused methods: 
namespace love_box2d
{
	int __error_index(lua_State * L);
	int _wrap_method_PolygonShape_getData(lua_State * L);
	int _wrap_method_PolygonShape_setCategory(lua_State * L);
	int _wrap_method_PolygonShape_getBoundingBox(lua_State * L);
	int _wrap_method_PolygonShape_getCategory(lua_State * L);
	int _wrap_method_PolygonShape_getPoints(lua_State * L);
	int _wrap_method_PolygonShape_testSegment(lua_State * L);
	int _wrap_method_PolygonShape_setData(lua_State * L);
	int _wrap_method_PolygonShape_getMask(lua_State * L);
	int _wrap_method_PolygonShape_setMask(lua_State * L);
	int _wrap_method_PolygonShape_destroy(lua_State * L);
	int _wrap_method_Body_getLocalPoint(lua_State * L);
	int _wrap_method_Body_getLocalCenter(lua_State * L);
	int _wrap_method_Body_getWorldPoint(lua_State * L);
	int _wrap_method_Body_getLocalVector(lua_State * L);
	int _wrap_method_Body_getVelocityLocalPoint(lua_State * L);
	int _wrap_method_Body_getVelocityWorldPoint(lua_State * L);
	int _wrap_method_Body_getPosition(lua_State * L);
	int _wrap_method_Body_getVelocity(lua_State * L);
	int _wrap_method_Body_getWorldVector(lua_State * L);
	int _wrap_method_Body_getWorldCenter(lua_State * L);
	int _wrap_method_Body_destroy(lua_State * L);
	int _wrap_method_CircleShape_getCategory(lua_State * L);
	int _wrap_method_CircleShape_getData(lua_State * L);
	int _wrap_method_CircleShape_testSegment(lua_State * L);
	int _wrap_method_CircleShape_getBoundingBox(lua_State * L);
	int _wrap_method_CircleShape_setCategory(lua_State * L);
	int _wrap_method_CircleShape_setData(lua_State * L);
	int _wrap_method_CircleShape_getMask(lua_State * L);
	int _wrap_method_CircleShape_setMask(lua_State * L);
	int _wrap_method_CircleShape_destroy(lua_State * L);
	int _wrap_method_PrismaticJoint_getLimits(lua_State * L);
	int _wrap_method_PrismaticJoint_getReactionForce(lua_State * L);
	int _wrap_method_PrismaticJoint_getAnchors(lua_State * L);
	int _wrap_method_PrismaticJoint_destroy(lua_State * L);
	int _wrap_method_RevoluteJoint_getLimits(lua_State * L);
	int _wrap_method_RevoluteJoint_getReactionForce(lua_State * L);
	int _wrap_method_RevoluteJoint_getAnchors(lua_State * L);
	int _wrap_method_RevoluteJoint_destroy(lua_State * L);
	int _wrap_method_MouseJoint_getReactionForce(lua_State * L);
	int _wrap_method_MouseJoint_getTarget(lua_State * L);
	int _wrap_method_MouseJoint_getAnchors(lua_State * L);
	int _wrap_method_MouseJoint_destroy(lua_State * L);
	int _wrap_method_Contact_getPosition(lua_State * L);
	int _wrap_method_Contact_getVelocity(lua_State * L);
	int _wrap_method_Contact_getNormal(lua_State * L);
	int _wrap_method_DistanceJoint_getReactionForce(lua_State * L);
	int _wrap_method_DistanceJoint_getAnchors(lua_State * L);
	int _wrap_method_DistanceJoint_destroy(lua_State * L);
	int _wrap_method_World_getGravity(lua_State * L);
	int _wrap_method_World_getCallback(lua_State * L);
	int _wrap_method_World_setCallback(lua_State * L);
}


/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.35
 * 
 * This file is not intended to be easily readable and contains a number of 
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG 
 * interface file instead. 
 * ----------------------------------------------------------------------------- */


#ifdef __cplusplus
template<typename T> class SwigValueWrapper {
    T *tt;
public:
    SwigValueWrapper() : tt(0) { }
    SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
    SwigValueWrapper(const T& t) : tt(new T(t)) { }
    ~SwigValueWrapper() { delete tt; } 
    SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
    operator T&() const { return *tt; }
    T *operator&() { return tt; }
private:
    SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
};

template <typename T> T SwigValueInit() {
  return T();
}
#endif

/* -----------------------------------------------------------------------------
 *  This section contains generic SWIG labels for method/variable
 *  declarations/attributes, and other compiler dependent labels.
 * ----------------------------------------------------------------------------- */

/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
#  define SWIGTEMPLATEDISAMBIGUATOR template
# elif defined(__HP_aCC)
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
#  define SWIGTEMPLATEDISAMBIGUATOR template
# else
#  define SWIGTEMPLATEDISAMBIGUATOR
# endif
#endif

/* inline attribute */
#ifndef SWIGINLINE
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
#   define SWIGINLINE inline
# else
#   define SWIGINLINE
# endif
#endif

/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define SWIGUNUSED __attribute__ ((__unused__)) 
#   else
#     define SWIGUNUSED
#   endif
# elif defined(__ICC)
#   define SWIGUNUSED __attribute__ ((__unused__)) 
# else
#   define SWIGUNUSED 
# endif
#endif

#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
#   define SWIGUNUSEDPARM(p)
# else
#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
# endif
#endif

/* internal SWIG method */
#ifndef SWIGINTERN
# define SWIGINTERN static SWIGUNUSED
#endif

/* internal inline SWIG method */
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif

/* exporting methods */
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#  ifndef GCC_HASCLASSVISIBILITY
#    define GCC_HASCLASSVISIBILITY
#  endif
#endif

#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#     define SWIGEXPORT __attribute__ ((visibility("default")))
#   else
#     define SWIGEXPORT
#   endif
# endif
#endif

/* calling conventions for Windows */
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   define SWIGSTDCALL __stdcall
# else
#   define SWIGSTDCALL
# endif 
#endif

/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
#endif

/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
# define _SCL_SECURE_NO_DEPRECATE
#endif


/* -----------------------------------------------------------------------------
 * swigrun.swg
 *
 * This file contains generic CAPI SWIG runtime support for pointer
 * type checking.
 * ----------------------------------------------------------------------------- */

/* This should only be incremented when either the layout of swig_type_info changes,
   or for whatever reason, the runtime changes incompatibly */
#define SWIG_RUNTIME_VERSION "4"

/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
#ifdef SWIG_TYPE_TABLE
# define SWIG_QUOTE_STRING(x) #x
# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
#else
# define SWIG_TYPE_TABLE_NAME
#endif

/*
  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  creating a static or dynamic library from the swig runtime code.
  In 99.9% of the cases, swig just needs to declare them as 'static'.
  
  But only do this if is strictly necessary, ie, if you have problems
  with your compiler or so.
*/

#ifndef SWIGRUNTIME
# define SWIGRUNTIME SWIGINTERN
#endif

#ifndef SWIGRUNTIMEINLINE
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
#endif

/*  Generic buffer size */
#ifndef SWIG_BUFFER_SIZE
# define SWIG_BUFFER_SIZE 1024
#endif

/* Flags for pointer conversions */
#define SWIG_POINTER_DISOWN        0x1
#define SWIG_CAST_NEW_MEMORY       0x2

/* Flags for new pointer objects */
#define SWIG_POINTER_OWN           0x1


/* 
   Flags/methods for returning states.
   
   The swig conversion methods, as ConvertPtr, return and integer 
   that tells if the conversion was successful or not. And if not,
   an error code can be returned (see swigerrors.swg for the codes).
   
   Use the following macros/flags to set or process the returning
   states.
   
   In old swig versions, you usually write code as:

     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
       // success code
     } else {
       //fail code
     }

   Now you can be more explicit as:

    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
    } else {
      // fail code
    }

   that seems to be the same, but now you can also do

    Type *ptr;
    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
      if (SWIG_IsNewObj(res) {
        ...
	delete *ptr;
      } else {
        ...
      }
    } else {
      // fail code
    }
    
   I.e., now SWIG_ConvertPtr can return new objects and you can
   identify the case and take care of the deallocation. Of course that
   requires also to SWIG_ConvertPtr to return new result values, as

      int SWIG_ConvertPtr(obj, ptr,...) {         
        if (<obj is ok>) {			       
          if (<need new object>) {		       
            *ptr = <ptr to new allocated object>; 
            return SWIG_NEWOBJ;		       
          } else {				       
            *ptr = <ptr to old object>;	       
            return SWIG_OLDOBJ;		       
          } 				       
        } else {				       
          return SWIG_BADOBJ;		       
        }					       
      }

   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
   swig errors code.

   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
   allows to return the 'cast rank', for example, if you have this

       int food(double)
       int fooi(int);

   and you call
 
      food(1)   // cast rank '1'  (1 -> 1.0)
      fooi(1)   // cast rank '0'

   just use the SWIG_AddCast()/SWIG_CheckState()


 */
#define SWIG_OK                    (0) 
#define SWIG_ERROR                 (-1)
#define SWIG_IsOK(r)               (r >= 0)
#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  

/* The CastRankLimit says how many bits are used for the cast rank */
#define SWIG_CASTRANKLIMIT         (1 << 8)
/* The NewMask denotes the object was created (using new/malloc) */
#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
/* The TmpMask is for in/out typemaps that use temporal objects */
#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
/* Simple returning values */
#define SWIG_BADOBJ                (SWIG_ERROR)
#define SWIG_OLDOBJ                (SWIG_OK)
#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
/* Check, add and del mask methods */
#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))


/* Cast-Rank Mode */
#if defined(SWIG_CASTRANK_MODE)
#  ifndef SWIG_TypeRank
#    define SWIG_TypeRank             unsigned long
#  endif
#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
#    define SWIG_MAXCASTRANK          (2)
#  endif
#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
SWIGINTERNINLINE int SWIG_AddCast(int r) { 
  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
}
SWIGINTERNINLINE int SWIG_CheckState(int r) { 
  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
}
#else /* no cast-rank mode */
#  define SWIG_AddCast
#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif




#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef void *(*swig_converter_func)(void *, int *);
typedef struct swig_type_info *(*swig_dycast_func)(void **);

/* Structure to store information on one type */
typedef struct swig_type_info {
  const char             *name;			/* mangled name of this type */
  const char             *str;			/* human readable name of this type */
  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
  void                   *clientdata;		/* language specific type data */
  int                    owndata;		/* flag if the structure owns the clientdata */
} swig_type_info;

/* Structure to store a type and conversion function used for casting */
typedef struct swig_cast_info {
  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
  swig_converter_func     converter;		/* function to cast the void pointers */
  struct swig_cast_info  *next;			/* pointer to next cast in linked list */
  struct swig_cast_info  *prev;			/* pointer to the previous cast */
} swig_cast_info;

/* Structure used to store module information
 * Each module generates one structure like this, and the runtime collects
 * all of these structures and stores them in a circularly linked list.*/
typedef struct swig_module_info {
  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
  size_t                 size;		        /* Number of types in this module */
  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
  swig_type_info         **type_initial;	/* Array of initially generated type structures */
  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
  void                    *clientdata;		/* Language specific module data */
} swig_module_info;

/* 
  Compare two type names skipping the space characters, therefore
  "char*" == "char *" and "Class<int>" == "Class<int >", etc.

  Return 0 when the two name types are equivalent, as in
  strncmp, but skipping ' '.
*/
SWIGRUNTIME int
SWIG_TypeNameComp(const char *f1, const char *l1,
		  const char *f2, const char *l2) {
  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
    while ((*f1 == ' ') && (f1 != l1)) ++f1;
    while ((*f2 == ' ') && (f2 != l2)) ++f2;
    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
  }
  return (int)((l1 - f1) - (l2 - f2));
}

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if not equal, 1 if equal
*/
SWIGRUNTIME int
SWIG_TypeEquiv(const char *nb, const char *tb) {
  int equiv = 0;
  const char* te = tb + strlen(tb);
  const char* ne = nb;
  while (!equiv && *ne) {
    for (nb = ne; *ne; ++ne) {
      if (*ne == '|') break;
    }
    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
    if (*ne) ++ne;
  }
  return equiv;
}

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
*/
SWIGRUNTIME int
SWIG_TypeCompare(const char *nb, const char *tb) {
  int equiv = 0;
  const char* te = tb + strlen(tb);
  const char* ne = nb;
  while (!equiv && *ne) {
    for (nb = ne; *ne; ++ne) {
      if (*ne == '|') break;
    }
    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
    if (*ne) ++ne;
  }
  return equiv;
}


/* think of this as a c++ template<> or a scheme macro */
#define SWIG_TypeCheck_Template(comparison, ty)         \
  if (ty) {                                             \
    swig_cast_info *iter = ty->cast;                    \
    while (iter) {                                      \
      if (comparison) {                                 \
        if (iter == ty->cast) return iter;              \
        /* Move iter to the top of the linked list */   \
        iter->prev->next = iter->next;                  \
        if (iter->next)                                 \
          iter->next->prev = iter->prev;                \
        iter->next = ty->cast;                          \
        iter->prev = 0;                                 \
        if (ty->cast) ty->cast->prev = iter;            \
        ty->cast = iter;                                \
        return iter;                                    \
      }                                                 \
      iter = iter->next;                                \
    }                                                   \
  }                                                     \
  return 0

/*
  Check the typename
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
}

/* Same as previous function, except strcmp is replaced with a pointer comparison */
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
  SWIG_TypeCheck_Template(iter->type == from, into);
}

/*
  Cast a pointer up an inheritance hierarchy
*/
SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
}

/* 
   Dynamic pointer casting. Down an inheritance hierarchy
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
  swig_type_info *lastty = ty;
  if (!ty || !ty->dcast) return ty;
  while (ty && (ty->dcast)) {
    ty = (*ty->dcast)(ptr);
    if (ty) lastty = ty;
  }
  return lastty;
}

/*
  Return the name associated with this type
*/
SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info *ty) {
  return ty->name;
}

/*
  Return the pretty name associated with this type,
  that is an unmangled type name in a form presentable to the user.
*/
SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info *type) {
  /* The "str" field contains the equivalent pretty names of the
     type, separated by vertical-bar characters.  We choose
     to print the last name, as it is often (?) the most
     specific. */
  if (!type) return NULL;
  if (type->str != NULL) {
    const char *last_name = type->str;
    const char *s;
    for (s = type->str; *s; s++)
      if (*s == '|') last_name = s+1;
    return last_name;
  }
  else
    return type->name;
}

/* 
   Set the clientdata field for a type
*/
SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  swig_cast_info *cast = ti->cast;
  /* if (ti->clientdata == clientdata) return; */
  ti->clientdata = clientdata;
  
  while (cast) {
    if (!cast->converter) {
      swig_type_info *tc = cast->type;
      if (!tc->clientdata) {
	SWIG_TypeClientData(tc, clientdata);
      }
    }    
    cast = cast->next;
  }
}
SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
  SWIG_TypeClientData(ti, clientdata);
  ti->owndata = 1;
}
  
/*
  Search for a swig_type_info structure only by mangled name
  Search is a O(log #types)
  
  We start searching at module start, and finish searching when start == end.  
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info *start, 
                            swig_module_info *end, 
		            const char *name) {
  swig_module_info *iter = start;
  do {
    if (iter->size) {
      register size_t l = 0;
      register size_t r = iter->size - 1;
      do {
	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
	register size_t i = (l + r) >> 1; 
	const char *iname = iter->types[i]->name;
	if (iname) {
	  register int compare = strcmp(name, iname);
	  if (compare == 0) {	    
	    return iter->types[i];
	  } else if (compare < 0) {
	    if (i) {
	      r = i - 1;
	    } else {
	      break;
	    }
	  } else if (compare > 0) {
	    l = i + 1;
	  }
	} else {
	  break; /* should never happen */
	}
      } while (l <= r);
    }
    iter = iter->next;
  } while (iter != end);
  return 0;
}

/*
  Search for a swig_type_info structure for either a mangled name or a human readable name.
  It first searches the mangled names of the types, which is a O(log #types)
  If a type is not found it then searches the human readable names, which is O(#types).
  
  We start searching at module start, and finish searching when start == end.  
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info *start, 
                     swig_module_info *end, 
		     const char *name) {
  /* STEP 1: Search the name field using binary search */
  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
  if (ret) {
    return ret;
  } else {
    /* STEP 2: If the type hasn't been found, do a complete search
       of the str field (the human readable name) */
    swig_module_info *iter = start;
    do {
      register size_t i = 0;
      for (; i < iter->size; ++i) {
	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
	  return iter->types[i];
      }
      iter = iter->next;
    } while (iter != end);
  }
  
  /* neither found a match */
  return 0;
}

/* 
   Pack binary data into a string
*/
SWIGRUNTIME char *
SWIG_PackData(char *c, void *ptr, size_t sz) {
  static const char hex[17] = "0123456789abcdef";
  register const unsigned char *u = (unsigned char *) ptr;
  register const unsigned char *eu =  u + sz;
  for (; u != eu; ++u) {
    register unsigned char uu = *u;
    *(c++) = hex[(uu & 0xf0) >> 4];
    *(c++) = hex[uu & 0xf];
  }
  return c;
}

/* 
   Unpack binary data from a string
*/
SWIGRUNTIME const char *
SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
  register unsigned char *u = (unsigned char *) ptr;
  register const unsigned char *eu = u + sz;
  for (; u != eu; ++u) {
    register char d = *(c++);
    register unsigned char uu;
    if ((d >= '0') && (d <= '9'))
      uu = ((d - '0') << 4);
    else if ((d >= 'a') && (d <= 'f'))
      uu = ((d - ('a'-10)) << 4);
    else 
      return (char *) 0;
    d = *(c++);
    if ((d >= '0') && (d <= '9'))
      uu |= (d - '0');
    else if ((d >= 'a') && (d <= 'f'))
      uu |= (d - ('a'-10));
    else 
      return (char *) 0;
    *u = uu;
  }
  return c;
}

/* 
   Pack 'void *' into a string buffer.
*/
SWIGRUNTIME char *
SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
  char *r = buff;
  if ((2*sizeof(void *) + 2) > bsz) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,&ptr,sizeof(void *));
  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
  strcpy(r,name);
  return buff;
}

SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
  if (*c != '_') {
    if (strcmp(c,"NULL") == 0) {
      *ptr = (void *) 0;
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c,ptr,sizeof(void *));
}

SWIGRUNTIME char *
SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
  char *r = buff;
  size_t lname = (name ? strlen(name) : 0);
  if ((2*sz + 2 + lname) > bsz) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,ptr,sz);
  if (lname) {
    strncpy(r,name,lname+1);
  } else {
    *r = 0;
  }
  return buff;
}

SWIGRUNTIME const char *
SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
  if (*c != '_') {
    if (strcmp(c,"NULL") == 0) {
      memset(ptr,0,sz);
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c,ptr,sz);
}

#ifdef __cplusplus
}
#endif

/* -----------------------------------------------------------------------------
 * See the LICENSE file for information on copyright, usage and redistribution
 * of SWIG, and the README file for authors - http://www.swig.org/release.html.
 *
 * luarun.swg
 *
 * This file contains the runtime support for Lua modules
 * and includes code for managing global variables and pointer
 * type checking.
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#endif

#include "lua.h"
#include "lauxlib.h"
#include <stdlib.h>  /* for malloc */
#include <assert.h>  /* for a few sanity tests */

/* -----------------------------------------------------------------------------
 * global swig types
 * ----------------------------------------------------------------------------- */
/* Constant table */
#define SWIG_LUA_INT     1
#define SWIG_LUA_FLOAT   2
#define SWIG_LUA_STRING  3
#define SWIG_LUA_POINTER 4
#define SWIG_LUA_BINARY  5
#define SWIG_LUA_CHAR    6

/* Structure for variable linking table */
typedef struct {
  const char *name;
  lua_CFunction get;
  lua_CFunction set;
} swig_lua_var_info;

/* Constant information structure */
typedef struct {
    int type;
    char *name;
    long lvalue;
    double dvalue;
    void   *pvalue;
    swig_type_info **ptype;
} swig_lua_const_info;

typedef struct {
  const char     *name;
  lua_CFunction   method;
} swig_lua_method;

typedef struct {
  const char     *name;
  lua_CFunction   getmethod;
  lua_CFunction   setmethod;
} swig_lua_attribute;

typedef struct swig_lua_class {
  const char    *name;
  swig_type_info   **type;
  lua_CFunction  constructor;
  void    (*destructor)(void *);
  swig_lua_method   *methods;
  swig_lua_attribute     *attributes;
  struct swig_lua_class **bases;
  const char **base_names;
} swig_lua_class;

/* this is the struct for wrappering all pointers in SwigLua
*/
typedef struct {
  swig_type_info   *type;
  int     own;  /* 1 if owned & must be destroyed */
  void        *ptr;
} swig_lua_userdata;

/* this is the struct for wrapping arbitary packed binary data
(currently it is only used for member function pointers)
the data ordering is similar to swig_lua_userdata, but it is currently not possible
to tell the two structures apart within Swig, other than by looking at the type
*/
typedef struct {
  swig_type_info   *type;
  int     own;  /* 1 if owned & must be destroyed */
  char data[1];       /* arbitary amount of data */    
} swig_lua_rawdata;

/* Common SWIG API */
#define SWIG_NewPointerObj(L, ptr, type, owner)       SWIG_Lua_NewPointerObj(L, (void *)ptr, type, owner)
#define SWIG_ConvertPtr(L,idx, ptr, type, flags)    SWIG_Lua_ConvertPtr(L,idx,ptr,type,flags)
#define SWIG_MustGetPtr(L,idx, type,flags, argnum,fnname)  SWIG_Lua_MustGetPtr(L,idx, type,flags, argnum,fnname)
/* for C++ member pointers, ie, member methods */
#define SWIG_ConvertMember(L, idx, ptr, sz, ty)       SWIG_Lua_ConvertPacked(L, idx, ptr, sz, ty)
#define SWIG_NewMemberObj(L, ptr, sz, type)      SWIG_Lua_NewPackedObj(L, ptr, sz, type)

/* Runtime API */
#define SWIG_GetModule(clientdata) SWIG_Lua_GetModule((lua_State*)(clientdata))
#define SWIG_SetModule(clientdata, pointer) SWIG_Lua_SetModule((lua_State*) (clientdata), pointer)
#define SWIG_MODULE_CLIENTDATA_TYPE lua_State*

/* Contract support */
#define SWIG_contract_assert(expr, msg)  \
  if (!(expr)) { lua_pushstring(L, (char *) msg); goto fail; } else

/* helper #defines */
#define SWIG_fail {goto fail;}
#define SWIG_fail_arg(func_name,argnum,type) \
  {lua_pushfstring(L,"Error in %s (arg %d), expected '%s' got '%s'",\
  func_name,argnum,type,SWIG_Lua_typename(L,argnum));\
  goto fail;}
#define SWIG_fail_ptr(func_name,argnum,type) \
  SWIG_fail_arg(func_name,argnum,(type && type->str)?type->str:"void*")
#define SWIG_check_num_args(func_name,a,b) \
  if (lua_gettop(L)<a || lua_gettop(L)>b) \
  {lua_pushfstring(L,"Error in %s expected %d..%d args, got %d",func_name,a,b,lua_gettop(L));\
  goto fail;}


#define SWIG_Lua_get_table(L,n) \
  (lua_pushstring(L, n), lua_rawget(L,-2))

#define SWIG_Lua_add_function(L,n,f) \
  (lua_pushstring(L, n), \
      lua_pushcfunction(L, f), \
      lua_rawset(L,-3))

/* special helper for allowing 'nil' for usertypes */
#define SWIG_isptrtype(L,I) (lua_isuserdata(L,I) || lua_isnil(L,I))

#ifdef __cplusplus
/* Special helper for member function pointers 
it gets the address, casts it, then dereferences it */
//#define SWIG_mem_fn_as_voidptr(a)  (*((char**)&(a)))
#endif

/* storing/access of swig_module_info */
SWIGRUNTIME swig_module_info *
SWIG_Lua_GetModule(lua_State* L) {
  swig_module_info *ret = 0;
  lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
  lua_rawget(L,LUA_REGISTRYINDEX);
  if (lua_islightuserdata(L,-1))
    ret=(swig_module_info*)lua_touserdata(L,-1);
  lua_pop(L,1);  /* tidy */
  return ret;
}

SWIGRUNTIME void
SWIG_Lua_SetModule(lua_State* L, swig_module_info *module) {
  /* add this all into the Lua registry: */
  lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
  lua_pushlightuserdata(L,(void*)module);
  lua_rawset(L,LUA_REGISTRYINDEX);
}

/* -----------------------------------------------------------------------------
 * global variable support code: modules
 * ----------------------------------------------------------------------------- */

/* this function is called when trying to set an immutable.
default value is to print an error.
This can removed with a compile flag SWIGLUA_IGNORE_SET_IMMUTABLE */
SWIGINTERN int SWIG_Lua_set_immutable(lua_State* L)
{
/*  there should be 1 param passed in: the new value */
#ifndef SWIGLUA_IGNORE_SET_IMMUTABLE
  lua_pop(L,1);  /* remove it */
  lua_pushstring(L,"This variable is immutable");
  lua_error(L);
#endif
    return 0;   /* should not return anything */
}

/* the module.get method used for getting linked data */
SWIGINTERN int SWIG_Lua_module_get(lua_State* L)
{
/*  there should be 2 params passed in
  (1) table (not the meta table)
  (2) string name of the attribute
  printf("SWIG_Lua_module_get %p(%s) '%s'\n",
   lua_topointer(L,1),lua_typename(L,lua_type(L,1)),
   lua_tostring(L,2));
*/
  /* get the metatable */
  assert(lua_istable(L,1));  /* just in case */
  lua_getmetatable(L,1);  /* get the metatable */
  assert(lua_istable(L,-1));  /* just in case */
  SWIG_Lua_get_table(L,".get");  /* get the .get table */
  lua_remove(L,3);  /* remove metatable */
  if (lua_istable(L,-1))
  {
    /* look for the key in the .get table */
    lua_pushvalue(L,2);  /* key */
    lua_rawget(L,-2);
    lua_remove(L,3);  /* remove .get */
    if (lua_iscfunction(L,-1))
    {  /* found it so call the fn & return its value */
      lua_call(L,0,1);
      return 1;
    }
    lua_pop(L,1);  /* remove the top */
  }
  lua_pop(L,1);  /* remove the .get */
  lua_pushnil(L);  /* return a nil */
    return 1;
}

/* the module.set method used for setting linked data */
SWIGINTERN int SWIG_Lua_module_set(lua_State* L)
{
/*  there should be 3 params passed in
  (1) table (not the meta table)
  (2) string name of the attribute
  (3) any for the new value
*/
  /* get the metatable */
  assert(lua_istable(L,1));  /* just in case */
  lua_getmetatable(L,1);  /* get the metatable */
  assert(lua_istable(L,-1));  /* just in case */
  SWIG_Lua_get_table(L,".set");  /* get the .set table */
  lua_remove(L,4);  /* remove metatable */
  if (lua_istable(L,-1))
  {
    /* look for the key in the .set table */
    lua_pushvalue(L,2);  /* key */
    lua_rawget(L,-2);
    lua_remove(L,4);  /* remove .set */
    if (lua_iscfunction(L,-1))
    {  /* found it so call the fn & return its value */
      lua_pushvalue(L,3);  /* value */
      lua_call(L,1,0);
      return 0;
    }
  }
  lua_settop(L,3);  /* reset back to start */
  /* we now have the table, key & new value, so just set directly */
  lua_rawset(L,1);  /* add direct */
  return 0;
}

/* registering a module in lua */
SWIGINTERN void  SWIG_Lua_module_begin(lua_State* L,const char* name)
{
  assert(lua_istable(L,-1));  /* just in case */
  lua_pushstring(L,name);
  lua_newtable(L);   /* the table */
  /* add meta table */
  lua_newtable(L);    /* the meta table */
  SWIG_Lua_add_function(L,"__index",SWIG_Lua_module_get);
  SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_module_set);
  lua_pushstring(L,".get");
  lua_newtable(L);    /* the .get table */
  lua_rawset(L,-3);  /* add .get into metatable */
  lua_pushstring(L,".set");
  lua_newtable(L);    /* the .set table */
  lua_rawset(L,-3);  /* add .set into metatable */
  lua_setmetatable(L,-2);  /* sets meta table in module */
  lua_rawset(L,-3);        /* add module into parent */
  SWIG_Lua_get_table(L,name);   /* get the table back out */
}

/* ending the register */
SWIGINTERN void  SWIG_Lua_module_end(lua_State* L)
{
  lua_pop(L,1);       /* tidy stack (remove module) */
}

/* adding a linked variable to the module */
SWIGINTERN void SWIG_Lua_module_add_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn)
{
  assert(lua_istable(L,-1));  /* just in case */
  lua_getmetatable(L,-1);  /* get the metatable */
  assert(lua_istable(L,-1));  /* just in case */
  SWIG_Lua_get_table(L,".get"); /* find the .get table */
  assert(lua_istable(L,-1));  /* should be a table: */
  SWIG_Lua_add_function(L,name,getFn);
  lua_pop(L,1);       /* tidy stack (remove table) */
  if (setFn)  /* if there is a set fn */
  {
    SWIG_Lua_get_table(L,".set"); /* find the .set table */
    assert(lua_istable(L,-1));  /* should be a table: */
    SWIG_Lua_add_function(L,name,setFn);
    lua_pop(L,1);       /* tidy stack (remove table) */
  }
  lua_pop(L,1);       /* tidy stack (remove meta) */
}

/* adding a function module */
SWIGINTERN void  SWIG_Lua_module_add_function(lua_State* L,const char* name,lua_CFunction fn)
{
  SWIG_Lua_add_function(L,name,fn);
}

/* -----------------------------------------------------------------------------
 * global variable support code: classes
 * ----------------------------------------------------------------------------- */

/* the class.get method, performs the lookup of class attributes */
SWIGINTERN int  SWIG_Lua_class_get(lua_State* L)
{
/*  there should be 2 params passed in
  (1) userdata (not the meta table)
  (2) string name of the attribute
*/
  assert(lua_isuserdata(L,-2));  /* just in case */
  lua_getmetatable(L,-2);    /* get the meta table */
  assert(lua_istable(L,-1));  /* just in case */
  SWIG_Lua_get_table(L,".get"); /* find the .get table */
  assert(lua_istable(L,-1));  /* just in case */
  /* look for the key in the .get table */
  lua_pushvalue(L,2);  /* key */
  lua_rawget(L,-2);
  lua_remove(L,-2); /* stack tidy, remove .get table */
  if (lua_iscfunction(L,-1))
  {  /* found it so call the fn & return its value */
    lua_pushvalue(L,1);  /* the userdata */
    lua_call(L,1,1);  /* 1 value in (userdata),1 out (result) */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    return 1;
  }
  lua_pop(L,1);  /* remove whatever was there */
  /* ok, so try the .fn table */
  SWIG_Lua_get_table(L,".fn"); /* find the .get table */
  assert(lua_istable(L,-1));  /* just in case */
  lua_pushvalue(L,2);  /* key */
  lua_rawget(L,-2);  /* look for the fn */
  lua_remove(L,-2); /* stack tidy, remove .fn table */
  if (lua_isfunction(L,-1)) /* note: if its a C function or lua function */
  {  /* found it so return the fn & let lua call it */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    return 1;
  }
  lua_pop(L,1);  /* remove whatever was there */
  /* NEW: looks for the __getitem() fn
  this is a user provided get fn */
  SWIG_Lua_get_table(L,"__getitem"); /* find the __getitem fn */
  if (lua_iscfunction(L,-1))  /* if its there */
  {  /* found it so call the fn & return its value */
    lua_pushvalue(L,1);  /* the userdata */
    lua_pushvalue(L,2);  /* the parameter */
    lua_call(L,2,1);  /* 2 value in (userdata),1 out (result) */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    return 1;
  }
  return 0;  /* sorry not known */
}

/* the class.set method, performs the lookup of class attributes */
SWIGINTERN int  SWIG_Lua_class_set(lua_State* L)
{
/*  there should be 3 params passed in
  (1) table (not the meta table)
  (2) string name of the attribute
  (3) any for the new value
printf("SWIG_Lua_class_set %p(%s) '%s' %p(%s)\n",
      lua_topointer(L,1),lua_typename(L,lua_type(L,1)),
      lua_tostring(L,2),
      lua_topointer(L,3),lua_typename(L,lua_type(L,3)));*/

  assert(lua_isuserdata(L,1));  /* just in case */
  lua_getmetatable(L,1);    /* get the meta table */
  assert(lua_istable(L,-1));  /* just in case */

  SWIG_Lua_get_table(L,".set"); /* find the .set table */
  if (lua_istable(L,-1))
  {
    /* look for the key in the .set table */
    lua_pushvalue(L,2);  /* key */
    lua_rawget(L,-2);
    if (lua_iscfunction(L,-1))
    {  /* found it so call the fn & return its value */
      lua_pushvalue(L,1);  /* userdata */
      lua_pushvalue(L,3);  /* value */
      lua_call(L,2,0);
      return 0;
    }
    lua_pop(L,1);  /* remove the value */
  }
  lua_pop(L,1);  /* remove the value .set table */
  /* NEW: looks for the __setitem() fn
  this is a user provided set fn */
  SWIG_Lua_get_table(L,"__setitem"); /* find the fn */
  if (lua_iscfunction(L,-1))  /* if its there */
  {  /* found it so call the fn & return its value */
    lua_pushvalue(L,1);  /* the userdata */
    lua_pushvalue(L,2);  /* the parameter */
    lua_pushvalue(L,3);  /* the value */
    lua_call(L,3,0);  /* 3 values in ,0 out */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    return 1;
  }
  return 0;
}

/* the class.destruct method called by the interpreter */
SWIGINTERN int  SWIG_Lua_class_destruct(lua_State* L)
{
/*  there should be 1 params passed in
  (1) userdata (not the meta table) */
  swig_lua_userdata* usr;
  swig_lua_class* clss;
  assert(lua_isuserdata(L,-1));  /* just in case */
  usr=(swig_lua_userdata*)lua_touserdata(L,-1);  /* get it */
  /* if must be destroyed & has a destructor */
  if (usr->own) /* if must be destroyed */
  {
    clss=(swig_lua_class*)usr->type->clientdata;  /* get the class */
    if (clss && clss->destructor)  /* there is a destroy fn */
    {
      clss->destructor(usr->ptr);  /* bye bye */
    }
  }
  return 0;
}

/* gets the swig class registry (or creates it) */
SWIGINTERN void  SWIG_Lua_get_class_registry(lua_State* L)
{
  /* add this all into the swig registry: */
  lua_pushstring(L,"SWIG");
  lua_rawget(L,LUA_REGISTRYINDEX);  /* get the registry */
  if (!lua_istable(L,-1))  /* not there */
  {  /* must be first time, so add it */
    lua_pop(L,1);  /* remove the result */
    lua_pushstring(L,"SWIG");
    lua_newtable(L);
    lua_rawset(L,LUA_REGISTRYINDEX);
    /* then get it */
    lua_pushstring(L,"SWIG");
    lua_rawget(L,LUA_REGISTRYINDEX);
  }
}

/* helper fn to get the classes metatable from the register */
SWIGINTERN void  SWIG_Lua_get_class_metatable(lua_State* L,const char* cname)
{
  SWIG_Lua_get_class_registry(L);  /* get the registry */
  lua_pushstring(L,cname);  /* get the name */
  lua_rawget(L,-2);    /* get it */
  lua_remove(L,-2);    /* tidy up (remove registry) */
}

/* helper add a variable to a registered class */
SWIGINTERN void  SWIG_Lua_add_class_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn)
{
  assert(lua_istable(L,-1));  /* just in case */
  SWIG_Lua_get_table(L,".get"); /* find the .get table */
  assert(lua_istable(L,-1));  /* just in case */
  SWIG_Lua_add_function(L,name,getFn);
  lua_pop(L,1);       /* tidy stack (remove table) */
  if (setFn)
  {
    SWIG_Lua_get_table(L,".set"); /* find the .set table */
    assert(lua_istable(L,-1));  /* just in case */
    SWIG_Lua_add_function(L,name,setFn);
    lua_pop(L,1);       /* tidy stack (remove table) */
  }
}

/* helper to recursively add class details (attributes & operations) */
SWIGINTERN void  SWIG_Lua_add_class_details(lua_State* L,swig_lua_class* clss)
{
  int i;
  /* call all the base classes first: we can then override these later: */
  for(i=0;clss->bases[i];i++)
  {
    SWIG_Lua_add_class_details(L,clss->bases[i]);
  }
  /* add fns */
  for(i=0;clss->attributes[i].name;i++){
    SWIG_Lua_add_class_variable(L,clss->attributes[i].name,clss->attributes[i].getmethod,clss->attributes[i].setmethod);
  }
  /* add methods to the metatable */
  SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
  assert(lua_istable(L,-1));  /* just in case */
  for(i=0;clss->methods[i].name;i++){
    SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].method);
  }
  lua_pop(L,1);       /* tidy stack (remove table) */
  /*   add operator overloads
    these look ANY method which start with "__" and assume they
    are operator overloads & add them to the metatable
    (this might mess up is someone defines a method __gc (the destructor)*/
  for(i=0;clss->methods[i].name;i++){
    if (clss->methods[i].name[0]=='_' && clss->methods[i].name[1]=='_'){
      SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].method);
    }
  }
}

/* set up the base classes pointers.
Each class structure has a list of pointers to the base class structures.
This function fills them.
It cannot be done at compile time, as this will not work with hireachies
spread over more than one swig file. 
Therefore it must be done at runtime, querying the SWIG type system.
*/
SWIGINTERN void SWIG_Lua_init_base_class(lua_State* L,swig_lua_class* clss)
{
  int i=0;
  swig_module_info* module=SWIG_GetModule(L);
  for(i=0;clss->base_names[i];i++)
  {
    if (clss->bases[i]==0) /* not found yet */
    {
      /* lookup and cache the base class */
      swig_type_info *info = SWIG_TypeQueryModule(module,module,clss->base_names[i]);
      if (info) clss->bases[i] = (swig_lua_class *) info->clientdata;
    }
  }	
}

/* performs the entire class registration process */
SWIGINTERN void  SWIG_Lua_class_register(lua_State* L,swig_lua_class* clss)
{
  /*  add its constructor to module with the name of the class
  so you can do MyClass(...) as well as new_MyClass(...)
  BUT only if a constructor is defined
  (this overcomes the problem of pure virtual classes without constructors)*/
  if (clss->constructor)
    SWIG_Lua_add_function(L,clss->name,clss->constructor);

  SWIG_Lua_get_class_registry(L);  /* get the registry */
  lua_pushstring(L,clss->name);  /* get the name */
  lua_newtable(L);    /* create the metatable */
  /* add string of class name called ".type" */
  lua_pushstring(L,".type");
  lua_pushstring(L,clss->name);
  lua_rawset(L,-3);
  /* add a table called ".get" */
  lua_pushstring(L,".get");
  lua_newtable(L);
  lua_rawset(L,-3);
  /* add a table called ".set" */
  lua_pushstring(L,".set");
  lua_newtable(L);
  lua_rawset(L,-3);
  /* add a table called ".fn" */
  lua_pushstring(L,".fn");
  lua_newtable(L);
  lua_rawset(L,-3);
  /* add accessor fns for using the .get,.set&.fn */
  SWIG_Lua_add_function(L,"__index",SWIG_Lua_class_get);
  SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_class_set);
  SWIG_Lua_add_function(L,"__gc",SWIG_Lua_class_destruct);
  /* add it */
  lua_rawset(L,-3);  /* metatable into registry */
  lua_pop(L,1);      /* tidy stack (remove registry) */

  SWIG_Lua_get_class_metatable(L,clss->name);
  SWIG_Lua_add_class_details(L,clss);  /* recursive adding of details (atts & ops) */
  lua_pop(L,1);      /* tidy stack (remove class metatable) */
}

/* -----------------------------------------------------------------------------
 * Class/structure conversion fns
 * ----------------------------------------------------------------------------- */

/* helper to add metatable to new lua object */
SWIGINTERN void _SWIG_Lua_AddMetatable(lua_State* L,swig_type_info *type)
{
  if (type->clientdata)  /* there is clientdata: so add the metatable */
  {
    SWIG_Lua_get_class_metatable(L,((swig_lua_class*)(type->clientdata))->name);
    if (lua_istable(L,-1))
    {
      lua_setmetatable(L,-2);
    }
    else
    {
      lua_pop(L,1);
    }
  }
}

/* pushes a new object into the lua stack */
SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State* L,void* ptr,swig_type_info *type, int own)
{
  swig_lua_userdata* usr;
  if (!ptr){
    lua_pushnil(L);
    return;
  }
  usr=(swig_lua_userdata*)lua_newuserdata(L,sizeof(swig_lua_userdata));  /* get data */
  usr->ptr=ptr;  /* set the ptr */
  usr->type=type;
  usr->own=own;
  _SWIG_Lua_AddMetatable(L,type); /* add metatable */
}

/* takes a object from the lua stack & converts it into an object of the correct type
 (if possible) */
SWIGRUNTIME int  SWIG_Lua_ConvertPtr(lua_State* L,int index,void** ptr,swig_type_info *type,int flags)
{
  swig_lua_userdata* usr;
  swig_cast_info *cast;
  if (lua_isnil(L,index)){*ptr=0; return SWIG_OK;}    /* special case: lua nil => NULL pointer */
  usr=(swig_lua_userdata*)lua_touserdata(L,index);  /* get data */
  if (usr)
  {
    if (flags & SWIG_POINTER_DISOWN) /* must disown the object */
    {
        usr->own=0;
    }
    if (!type)            /* special cast void*, no casting fn */
    {
      *ptr=usr->ptr;
      return SWIG_OK; /* ok */
    }
    cast=SWIG_TypeCheckStruct(usr->type,type); /* performs normal type checking */
    if (cast)
    {
      int newmemory = 0;
      *ptr=SWIG_TypeCast(cast,usr->ptr,&newmemory);
      assert(!newmemory); /* newmemory handling not yet implemented */
      return SWIG_OK;  /* ok */
    }
  }
  return SWIG_ERROR;  /* error */
}

SWIGRUNTIME void* SWIG_Lua_MustGetPtr(lua_State* L,int index,swig_type_info *type,int flags,
       int argnum,const char* func_name){
  void* result;
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,index,&result,type,flags))){
    lua_pushfstring(L,"Error in %s, expected a %s at argument number %d\n",
      func_name,(type && type->str)?type->str:"void*",argnum);
    lua_error(L);
  }
  return result;
}

/* pushes a packed userdata. user for member fn pointers only */
SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State* L,void* ptr,size_t size,swig_type_info *type)
{
  swig_lua_rawdata* raw;
  assert(ptr); /* not acceptable to pass in a NULL value */
  raw=(swig_lua_rawdata*)lua_newuserdata(L,sizeof(swig_lua_rawdata)-1+size);  /* alloc data */
  raw->type=type;
  raw->own=0;
  memcpy(raw->data,ptr,size); /* copy the data */
  _SWIG_Lua_AddMetatable(L,type); /* add metatable */
}
    
/* converts a packed userdata. user for member fn pointers only */
SWIGRUNTIME int  SWIG_Lua_ConvertPacked(lua_State* L,int index,void* ptr,size_t size,swig_type_info *type)
{
  swig_lua_rawdata* raw;
  raw=(swig_lua_rawdata*)lua_touserdata(L,index);  /* get data */
  if (!raw) return SWIG_ERROR;  /* error */
  if (type==0 || type==raw->type) /* void* or identical type */
  {
    memcpy(ptr,raw->data,size); /* copy it */
    return SWIG_OK; /* ok */
  }
  return SWIG_ERROR;  /* error */
}

/* a function to get the typestring of a piece of data */
SWIGRUNTIME const char *SWIG_Lua_typename(lua_State *L, int tp)
{
  swig_lua_userdata* usr;
  if (lua_isuserdata(L,tp))
  {
    usr=(swig_lua_userdata*)lua_touserdata(L,1);  /* get data */
    if (usr && usr->type && usr->type->str)
      return usr->type->str;
    return "userdata (unknown type)";
  }
  return lua_typename(L,lua_type(L,tp));
}

/* lua callable function to get the userdata's type */
SWIGRUNTIME int SWIG_Lua_type(lua_State* L)
{
  lua_pushstring(L,SWIG_Lua_typename(L,1));
  return 1;
}

/* lua callable function to compare userdata's value
the issue is that two userdata may point to the same thing
but to lua, they are different objects */
SWIGRUNTIME int SWIG_Lua_equal(lua_State* L)
{
  int result;
  swig_lua_userdata *usr1,*usr2;
  if (!lua_isuserdata(L,1) || !lua_isuserdata(L,2))  /* just in case */
    return 0;  /* nil reply */
  usr1=(swig_lua_userdata*)lua_touserdata(L,1);  /* get data */
  usr2=(swig_lua_userdata*)lua_touserdata(L,2);  /* get data */
  /*result=(usr1->ptr==usr2->ptr && usr1->type==usr2->type); only works if type is the same*/
  result=(usr1->ptr==usr2->ptr);
   lua_pushboolean(L,result);
  return 1;
}

/* -----------------------------------------------------------------------------
 * global variable support code: class/struct typemap functions
 * ----------------------------------------------------------------------------- */

/* Install Constants */
SWIGINTERN void
SWIG_Lua_InstallConstants(lua_State* L, swig_lua_const_info constants[]) {
  int i;
  for (i = 0; constants[i].type; i++) {
    switch(constants[i].type) {
    case SWIG_LUA_INT:
      lua_pushstring(L,constants[i].name);
      lua_pushnumber(L,(lua_Number)constants[i].lvalue);
      lua_rawset(L,-3);
      break;
    case SWIG_LUA_FLOAT:
      lua_pushstring(L,constants[i].name);
      lua_pushnumber(L,(lua_Number)constants[i].dvalue);
      lua_rawset(L,-3);
      break;
    case SWIG_LUA_CHAR:
      lua_pushstring(L,constants[i].name);
      lua_pushfstring(L,"%c",(char)constants[i].lvalue);
      lua_rawset(L,-3);
      break;
    case SWIG_LUA_STRING:
      lua_pushstring(L,constants[i].name);
      lua_pushstring(L,(char *) constants[i].pvalue);
      lua_rawset(L,-3);
      break;
    case SWIG_LUA_POINTER:
      lua_pushstring(L,constants[i].name);
      SWIG_NewPointerObj(L,constants[i].pvalue, *(constants[i]).ptype,0);
      lua_rawset(L,-3);
      break;
    case SWIG_LUA_BINARY:
      lua_pushstring(L,constants[i].name);
      SWIG_NewMemberObj(L,constants[i].pvalue,constants[i].lvalue,*(constants[i]).ptype);
      lua_rawset(L,-3);
      break;
    default:
      break;
    }
  }
}

/* -----------------------------------------------------------------------------
 * executing lua code from within the wrapper
 * ----------------------------------------------------------------------------- */

#ifndef SWIG_DOSTRING_FAIL /* Allows redefining of error function */
#define SWIG_DOSTRING_FAIL(S) fprintf(stderr,"%s\n",S)
#endif
/* Executes a C string in Lua a really simple way of calling lua from C
Unfortunately lua keeps changing its API's, so we need a conditional compile
In lua 5.0.X its lua_dostring()
In lua 5.1.X its luaL_dostring()
*/
SWIGINTERN int 
SWIG_Lua_dostring(lua_State *L, const char* str) {
  int ok,top;
  if (str==0 || str[0]==0) return 0; /* nothing to do */
  top=lua_gettop(L); /* save stack */
#if (defined(LUA_VERSION_NUM) && (LUA_VERSION_NUM>=501))
  ok=luaL_dostring(L,str);	/* looks like this is lua 5.1.X or later, good */
#else
  ok=lua_dostring(L,str);	/* might be lua 5.0.x, using lua_dostring */
#endif
  if (ok!=0) {
    SWIG_DOSTRING_FAIL(lua_tostring(L,-1));
  }
  lua_settop(L,top); /* restore the stack */
  return ok;
}    

#ifdef __cplusplus
}
#endif

/* ------------------------------ end luarun.swg  ------------------------------ */


/* -------- TYPES TABLE (BEGIN) -------- */

#define SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t swig_types[0]
#define SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t swig_types[1]
#define SWIGTYPE_p_boost__shared_ptrT_love_box2d__Contact_t swig_types[2]
#define SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t swig_types[3]
#define SWIGTYPE_p_boost__shared_ptrT_love_box2d__Joint_t swig_types[4]
#define SWIGTYPE_p_boost__shared_ptrT_love_box2d__MouseJoint_t swig_types[5]
#define SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t swig_types[6]
#define SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t swig_types[7]
#define SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t swig_types[8]
#define SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t swig_types[9]
#define SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t swig_types[10]
#define SWIGTYPE_p_love_box2d__Body swig_types[11]
#define SWIGTYPE_p_love_box2d__CircleShape swig_types[12]
#define SWIGTYPE_p_love_box2d__Contact swig_types[13]
#define SWIGTYPE_p_love_box2d__DistanceJoint swig_types[14]
#define SWIGTYPE_p_love_box2d__Joint swig_types[15]
#define SWIGTYPE_p_love_box2d__MouseJoint swig_types[16]
#define SWIGTYPE_p_love_box2d__PolygonShape swig_types[17]
#define SWIGTYPE_p_love_box2d__PrismaticJoint swig_types[18]
#define SWIGTYPE_p_love_box2d__RevoluteJoint swig_types[19]
#define SWIGTYPE_p_love_box2d__Shape swig_types[20]
#define SWIGTYPE_p_love_box2d__World swig_types[21]
static swig_type_info *swig_types[23];
static swig_module_info swig_module = {swig_types, 22, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)

/* -------- TYPES TABLE (END) -------- */

#define SWIG_name      "mod_box2d"
#define SWIG_init      luaopen_mod_box2d
#define SWIG_init_user luaopen_mod_box2d_user

#define SWIG_LUACODE   luaopen_mod_box2d_luacode


namespace swig {
typedef struct{} LANGUAGE_OBJ;
}


#include <boost/shared_ptr.hpp>
#include "love_box2d.h"

#include "World.h"
#include "Body.h"
#include "Shape.h"
#include "CircleShape.h"
#include "PolygonShape.h"
#include "Contact.h"
#include "Joint.h"
#include "DistanceJoint.h"
#include "MouseJoint.h"
#include "RevoluteJoint.h"
#include "PrismaticJoint.h"
#ifdef __cplusplus
extern "C" {
#endif
static int _wrap_World_update(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::World *arg1 = (love_box2d::World *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("update",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("update",1,"love_box2d::World *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("update",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__World,0))){
    SWIG_fail_ptr("World_update",1,SWIGTYPE_p_love_box2d__World);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->update(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_setGravity(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::World *arg1 = (love_box2d::World *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("setGravity",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setGravity",1,"love_box2d::World *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setGravity",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("setGravity",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__World,0))){
    SWIG_fail_ptr("World_setGravity",1,SWIGTYPE_p_love_box2d__World);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->setGravity(arg2,arg3);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_getBodyCount(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::World *arg1 = (love_box2d::World *) 0 ;
  int result;
  
  SWIG_check_num_args("getBodyCount",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getBodyCount",1,"love_box2d::World *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__World,0))){
    SWIG_fail_ptr("World_getBodyCount",1,SWIGTYPE_p_love_box2d__World);
  }
  
  result = (int)(arg1)->getBodyCount();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_getJointCount(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::World *arg1 = (love_box2d::World *) 0 ;
  int result;
  
  SWIG_check_num_args("getJointCount",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getJointCount",1,"love_box2d::World *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__World,0))){
    SWIG_fail_ptr("World_getJointCount",1,SWIGTYPE_p_love_box2d__World);
  }
  
  result = (int)(arg1)->getJointCount();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_delete_World(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::World *arg1 = (love_box2d::World *) 0 ;
  
  SWIG_check_num_args("love_box2d::World::~World",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("love_box2d::World::~World",1,"love_box2d::World *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__World,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("delete_World",1,SWIGTYPE_p_love_box2d__World);
  }
  
  delete arg1;
  
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_World(void *obj) {
love_box2d::World *arg1 = (love_box2d::World *) obj;
delete arg1;
}
static swig_lua_method swig_love_box2d_World_methods[] = {
    {"update", _wrap_World_update}, 
    {"setGravity", _wrap_World_setGravity}, 
    {"getBodyCount", _wrap_World_getBodyCount}, 
    {"getJointCount", _wrap_World_getJointCount}, 
    {0,0}
};
static swig_lua_attribute swig_love_box2d_World_attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_love_box2d_World_bases[] = {0};
static const char *swig_love_box2d_World_base_names[] = {0};
static swig_lua_class _wrap_class_love_box2d_World = { "World", &SWIGTYPE_p_love_box2d__World,0, swig_delete_World, swig_love_box2d_World_methods, swig_love_box2d_World_attributes, swig_love_box2d_World_bases, swig_love_box2d_World_base_names };

static int _wrap_SmartWorld___deref__(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::World > *arg1 = (boost::shared_ptr< love_box2d::World > *) 0 ;
  love_box2d::World *result = 0 ;
  
  SWIG_check_num_args("operator ->",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("operator ->",1,"boost::shared_ptr< love_box2d::World > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t,0))){
    SWIG_fail_ptr("SmartWorld___deref__",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t);
  }
  
  result = (love_box2d::World *)((boost::shared_ptr< love_box2d::World > const *)arg1)->operator ->();
  SWIG_arg=0;
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_love_box2d__World,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_delete_SmartWorld(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::World > *arg1 = (boost::shared_ptr< love_box2d::World > *) 0 ;
  
  SWIG_check_num_args("boost::shared_ptr<(love_box2d::World)>::~shared_ptr<(love_box2d::World)>",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("boost::shared_ptr<(love_box2d::World)>::~shared_ptr<(love_box2d::World)>",1,"boost::shared_ptr< love_box2d::World > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("delete_SmartWorld",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t);
  }
  
  delete arg1;
  
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartWorld_update(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::World > *arg1 = (boost::shared_ptr< love_box2d::World > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("update",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("update",1,"boost::shared_ptr< love_box2d::World > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("update",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t,0))){
    SWIG_fail_ptr("SmartWorld_update",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->update(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartWorld_setGravity(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::World > *arg1 = (boost::shared_ptr< love_box2d::World > *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("setGravity",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setGravity",1,"boost::shared_ptr< love_box2d::World > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setGravity",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("setGravity",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t,0))){
    SWIG_fail_ptr("SmartWorld_setGravity",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (*arg1)->setGravity(arg2,arg3);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartWorld_getBodyCount(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::World > *arg1 = (boost::shared_ptr< love_box2d::World > *) 0 ;
  int result;
  
  SWIG_check_num_args("getBodyCount",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getBodyCount",1,"boost::shared_ptr< love_box2d::World > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t,0))){
    SWIG_fail_ptr("SmartWorld_getBodyCount",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t);
  }
  
  result = (int)(*arg1)->getBodyCount();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartWorld_getJointCount(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::World > *arg1 = (boost::shared_ptr< love_box2d::World > *) 0 ;
  int result;
  
  SWIG_check_num_args("getJointCount",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getJointCount",1,"boost::shared_ptr< love_box2d::World > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t,0))){
    SWIG_fail_ptr("SmartWorld_getJointCount",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t);
  }
  
  result = (int)(*arg1)->getJointCount();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_SmartWorld(void *obj) {
boost::shared_ptr< love_box2d::World > *arg1 = (boost::shared_ptr< love_box2d::World > *) obj;
delete arg1;
}
static swig_lua_method swig_boost_shared_ptr_Sl_love_box2d_World_Sg__methods[] = {
	{"getGravity", love_box2d::_wrap_method_World_getGravity},
	{"getCallback", love_box2d::_wrap_method_World_getCallback},
	{"setCallback", love_box2d::_wrap_method_World_setCallback},
    {"__deref__", _wrap_SmartWorld___deref__}, 
    {"update", _wrap_SmartWorld_update}, 
    {"setGravity", _wrap_SmartWorld_setGravity}, 
    {"getBodyCount", _wrap_SmartWorld_getBodyCount}, 
    {"getJointCount", _wrap_SmartWorld_getJointCount}, 
    {0,0}
};
static swig_lua_attribute swig_boost_shared_ptr_Sl_love_box2d_World_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_boost_shared_ptr_Sl_love_box2d_World_Sg__bases[] = {0};
static const char *swig_boost_shared_ptr_Sl_love_box2d_World_Sg__base_names[] = {0};
static swig_lua_class _wrap_class_boost_shared_ptr_Sl_love_box2d_World_Sg_ = { "SmartWorld", &SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t,0, swig_delete_SmartWorld, swig_boost_shared_ptr_Sl_love_box2d_World_Sg__methods, swig_boost_shared_ptr_Sl_love_box2d_World_Sg__attributes, swig_boost_shared_ptr_Sl_love_box2d_World_Sg__bases, swig_boost_shared_ptr_Sl_love_box2d_World_Sg__base_names };

static int _wrap_Body_getX(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  float result;
  
  SWIG_check_num_args("getX",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getX",1,"love_box2d::Body *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_getX",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  result = (float)(arg1)->getX();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_getY(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  float result;
  
  SWIG_check_num_args("getY",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getY",1,"love_box2d::Body *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_getY",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  result = (float)(arg1)->getY();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_getAngle(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  float result;
  
  SWIG_check_num_args("getAngle",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getAngle",1,"love_box2d::Body *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_getAngle",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  result = (float)(arg1)->getAngle();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_getSpin(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  float result;
  
  SWIG_check_num_args("getSpin",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getSpin",1,"love_box2d::Body const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_getSpin",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  result = (float)((love_box2d::Body const *)arg1)->getSpin();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_getMass(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  float result;
  
  SWIG_check_num_args("getMass",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getMass",1,"love_box2d::Body const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_getMass",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  result = (float)((love_box2d::Body const *)arg1)->getMass();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_getInertia(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  float result;
  
  SWIG_check_num_args("getInertia",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getInertia",1,"love_box2d::Body const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_getInertia",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  result = (float)((love_box2d::Body const *)arg1)->getInertia();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_getAngularDamping(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  float result;
  
  SWIG_check_num_args("getAngularDamping",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getAngularDamping",1,"love_box2d::Body const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_getAngularDamping",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  result = (float)((love_box2d::Body const *)arg1)->getAngularDamping();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_getDamping(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  float result;
  
  SWIG_check_num_args("getDamping",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getDamping",1,"love_box2d::Body const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_getDamping",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  result = (float)((love_box2d::Body const *)arg1)->getDamping();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_applyImpulse__SWIG_0(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("applyImpulse",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("applyImpulse",1,"love_box2d::Body *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("applyImpulse",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("applyImpulse",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_applyImpulse",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->applyImpulse(arg2,arg3);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_applyImpulse__SWIG_1(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  float arg2 ;
  float arg3 ;
  float arg4 ;
  float arg5 ;
  
  SWIG_check_num_args("applyImpulse",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("applyImpulse",1,"love_box2d::Body *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("applyImpulse",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("applyImpulse",3,"float");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("applyImpulse",4,"float");
  if(!lua_isnumber(L,5)) SWIG_fail_arg("applyImpulse",5,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_applyImpulse",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (float)lua_tonumber(L, 4);
  arg5 = (float)lua_tonumber(L, 5);
  (arg1)->applyImpulse(arg2,arg3,arg4,arg5);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_applyImpulse(lua_State* L) {
  int argc;
  int argv[6]={
    1,2,3,4,5,6
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_love_box2d__Body, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Body_applyImpulse__SWIG_0(L);
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_love_box2d__Body, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isnumber(L,argv[4]);
            }
            if (_v) {
              return _wrap_Body_applyImpulse__SWIG_1(L);
            }
          }
        }
      }
    }
  }
  
  lua_pushstring(L,"No matching function for overloaded 'Body_applyImpulse'");
  lua_error(L);return 0;
}


static int _wrap_Body_applyForce__SWIG_0(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("applyForce",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("applyForce",1,"love_box2d::Body *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("applyForce",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("applyForce",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_applyForce",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->applyForce(arg2,arg3);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_applyForce__SWIG_1(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  float arg2 ;
  float arg3 ;
  float arg4 ;
  float arg5 ;
  
  SWIG_check_num_args("applyForce",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("applyForce",1,"love_box2d::Body *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("applyForce",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("applyForce",3,"float");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("applyForce",4,"float");
  if(!lua_isnumber(L,5)) SWIG_fail_arg("applyForce",5,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_applyForce",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (float)lua_tonumber(L, 4);
  arg5 = (float)lua_tonumber(L, 5);
  (arg1)->applyForce(arg2,arg3,arg4,arg5);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_applyForce(lua_State* L) {
  int argc;
  int argv[6]={
    1,2,3,4,5,6
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_love_box2d__Body, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Body_applyForce__SWIG_0(L);
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_love_box2d__Body, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isnumber(L,argv[4]);
            }
            if (_v) {
              return _wrap_Body_applyForce__SWIG_1(L);
            }
          }
        }
      }
    }
  }
  
  lua_pushstring(L,"No matching function for overloaded 'Body_applyForce'");
  lua_error(L);return 0;
}


static int _wrap_Body_applyTorque(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("applyTorque",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("applyTorque",1,"love_box2d::Body *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("applyTorque",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_applyTorque",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->applyTorque(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_setX(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setX",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setX",1,"love_box2d::Body *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setX",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_setX",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->setX(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_setY(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setY",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setY",1,"love_box2d::Body *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setY",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_setY",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->setY(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_setPosition(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("setPosition",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setPosition",1,"love_box2d::Body *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setPosition",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("setPosition",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_setPosition",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->setPosition(arg2,arg3);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_setVelocity(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("setVelocity",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setVelocity",1,"love_box2d::Body *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setVelocity",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("setVelocity",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_setVelocity",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->setVelocity(arg2,arg3);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_setAngle(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setAngle",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setAngle",1,"love_box2d::Body *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setAngle",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_setAngle",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->setAngle(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_setSpin(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setSpin",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setSpin",1,"love_box2d::Body *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setSpin",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_setSpin",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->setSpin(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_setMassFromShapes(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  
  SWIG_check_num_args("setMassFromShapes",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setMassFromShapes",1,"love_box2d::Body *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_setMassFromShapes",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  (arg1)->setMassFromShapes();
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_setMass(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  float arg2 ;
  float arg3 ;
  float arg4 ;
  float arg5 ;
  
  SWIG_check_num_args("setMass",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setMass",1,"love_box2d::Body *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setMass",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("setMass",3,"float");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("setMass",4,"float");
  if(!lua_isnumber(L,5)) SWIG_fail_arg("setMass",5,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_setMass",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (float)lua_tonumber(L, 4);
  arg5 = (float)lua_tonumber(L, 5);
  (arg1)->setMass(arg2,arg3,arg4,arg5);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_setAngularDamping(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setAngularDamping",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setAngularDamping",1,"love_box2d::Body *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setAngularDamping",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_setAngularDamping",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->setAngularDamping(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_setDamping(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setDamping",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setDamping",1,"love_box2d::Body *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setDamping",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_setDamping",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->setDamping(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_isBullet(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  bool result;
  
  SWIG_check_num_args("isBullet",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("isBullet",1,"love_box2d::Body const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_isBullet",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  result = (bool)((love_box2d::Body const *)arg1)->isBullet();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_setBullet(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("setBullet",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setBullet",1,"love_box2d::Body *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("setBullet",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_setBullet",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (arg1)->setBullet(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_isStatic(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  bool result;
  
  SWIG_check_num_args("isStatic",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("isStatic",1,"love_box2d::Body const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_isStatic",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  result = (bool)((love_box2d::Body const *)arg1)->isStatic();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_isDynamic(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  bool result;
  
  SWIG_check_num_args("isDynamic",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("isDynamic",1,"love_box2d::Body const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_isDynamic",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  result = (bool)((love_box2d::Body const *)arg1)->isDynamic();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_isFrozen(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  bool result;
  
  SWIG_check_num_args("isFrozen",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("isFrozen",1,"love_box2d::Body const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_isFrozen",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  result = (bool)((love_box2d::Body const *)arg1)->isFrozen();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_isSleeping(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  bool result;
  
  SWIG_check_num_args("isSleeping",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("isSleeping",1,"love_box2d::Body const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_isSleeping",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  result = (bool)((love_box2d::Body const *)arg1)->isSleeping();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_setAllowSleep(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("setAllowSleep",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setAllowSleep",1,"love_box2d::Body *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("setAllowSleep",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_setAllowSleep",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (arg1)->setAllowSleep(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Body_setSleep(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("setSleep",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setSleep",1,"love_box2d::Body *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("setSleep",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,0))){
    SWIG_fail_ptr("Body_setSleep",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (arg1)->setSleep(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_delete_Body(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Body *arg1 = (love_box2d::Body *) 0 ;
  
  SWIG_check_num_args("love_box2d::Body::~Body",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("love_box2d::Body::~Body",1,"love_box2d::Body *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Body,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("delete_Body",1,SWIGTYPE_p_love_box2d__Body);
  }
  
  delete arg1;
  
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Body(void *obj) {
love_box2d::Body *arg1 = (love_box2d::Body *) obj;
delete arg1;
}
static swig_lua_method swig_love_box2d_Body_methods[] = {
    {"getX", _wrap_Body_getX}, 
    {"getY", _wrap_Body_getY}, 
    {"getAngle", _wrap_Body_getAngle}, 
    {"getSpin", _wrap_Body_getSpin}, 
    {"getMass", _wrap_Body_getMass}, 
    {"getInertia", _wrap_Body_getInertia}, 
    {"getAngularDamping", _wrap_Body_getAngularDamping}, 
    {"getDamping", _wrap_Body_getDamping}, 
    {"applyImpulse", _wrap_Body_applyImpulse}, 
    {"applyForce", _wrap_Body_applyForce}, 
    {"applyTorque", _wrap_Body_applyTorque}, 
    {"setX", _wrap_Body_setX}, 
    {"setY", _wrap_Body_setY}, 
    {"setPosition", _wrap_Body_setPosition}, 
    {"setVelocity", _wrap_Body_setVelocity}, 
    {"setAngle", _wrap_Body_setAngle}, 
    {"setSpin", _wrap_Body_setSpin}, 
    {"setMassFromShapes", _wrap_Body_setMassFromShapes}, 
    {"setMass", _wrap_Body_setMass}, 
    {"setAngularDamping", _wrap_Body_setAngularDamping}, 
    {"setDamping", _wrap_Body_setDamping}, 
    {"isBullet", _wrap_Body_isBullet}, 
    {"setBullet", _wrap_Body_setBullet}, 
    {"isStatic", _wrap_Body_isStatic}, 
    {"isDynamic", _wrap_Body_isDynamic}, 
    {"isFrozen", _wrap_Body_isFrozen}, 
    {"isSleeping", _wrap_Body_isSleeping}, 
    {"setAllowSleep", _wrap_Body_setAllowSleep}, 
    {"setSleep", _wrap_Body_setSleep}, 
    {0,0}
};
static swig_lua_attribute swig_love_box2d_Body_attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_love_box2d_Body_bases[] = {0};
static const char *swig_love_box2d_Body_base_names[] = {0};
static swig_lua_class _wrap_class_love_box2d_Body = { "Body", &SWIGTYPE_p_love_box2d__Body,0, swig_delete_Body, swig_love_box2d_Body_methods, swig_love_box2d_Body_attributes, swig_love_box2d_Body_bases, swig_love_box2d_Body_base_names };

static int _wrap_SmartBody___deref__(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  love_box2d::Body *result = 0 ;
  
  SWIG_check_num_args("operator ->",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("operator ->",1,"boost::shared_ptr< love_box2d::Body > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody___deref__",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  result = (love_box2d::Body *)((boost::shared_ptr< love_box2d::Body > const *)arg1)->operator ->();
  SWIG_arg=0;
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_love_box2d__Body,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_delete_SmartBody(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  
  SWIG_check_num_args("boost::shared_ptr<(love_box2d::Body)>::~shared_ptr<(love_box2d::Body)>",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("boost::shared_ptr<(love_box2d::Body)>::~shared_ptr<(love_box2d::Body)>",1,"boost::shared_ptr< love_box2d::Body > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("delete_SmartBody",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  delete arg1;
  
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_getX(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  float result;
  
  SWIG_check_num_args("getX",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getX",1,"boost::shared_ptr< love_box2d::Body > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_getX",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  result = (float)(*arg1)->getX();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_getY(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  float result;
  
  SWIG_check_num_args("getY",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getY",1,"boost::shared_ptr< love_box2d::Body > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_getY",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  result = (float)(*arg1)->getY();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_getAngle(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  float result;
  
  SWIG_check_num_args("getAngle",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getAngle",1,"boost::shared_ptr< love_box2d::Body > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_getAngle",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  result = (float)(*arg1)->getAngle();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_getSpin(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  float result;
  
  SWIG_check_num_args("getSpin",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getSpin",1,"boost::shared_ptr< love_box2d::Body > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_getSpin",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  result = (float)(*arg1)->getSpin();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_getMass(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  float result;
  
  SWIG_check_num_args("getMass",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getMass",1,"boost::shared_ptr< love_box2d::Body > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_getMass",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  result = (float)(*arg1)->getMass();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_getInertia(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  float result;
  
  SWIG_check_num_args("getInertia",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getInertia",1,"boost::shared_ptr< love_box2d::Body > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_getInertia",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  result = (float)(*arg1)->getInertia();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_getAngularDamping(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  float result;
  
  SWIG_check_num_args("getAngularDamping",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getAngularDamping",1,"boost::shared_ptr< love_box2d::Body > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_getAngularDamping",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  result = (float)(*arg1)->getAngularDamping();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_getDamping(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  float result;
  
  SWIG_check_num_args("getDamping",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getDamping",1,"boost::shared_ptr< love_box2d::Body > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_getDamping",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  result = (float)(*arg1)->getDamping();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_applyImpulse__SWIG_0(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("applyImpulse",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("applyImpulse",1,"boost::shared_ptr< love_box2d::Body > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("applyImpulse",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("applyImpulse",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_applyImpulse",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (*arg1)->applyImpulse(arg2,arg3);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_applyImpulse__SWIG_1(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  float arg2 ;
  float arg3 ;
  float arg4 ;
  float arg5 ;
  
  SWIG_check_num_args("applyImpulse",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("applyImpulse",1,"boost::shared_ptr< love_box2d::Body > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("applyImpulse",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("applyImpulse",3,"float");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("applyImpulse",4,"float");
  if(!lua_isnumber(L,5)) SWIG_fail_arg("applyImpulse",5,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_applyImpulse",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (float)lua_tonumber(L, 4);
  arg5 = (float)lua_tonumber(L, 5);
  (*arg1)->applyImpulse(arg2,arg3,arg4,arg5);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_applyImpulse(lua_State* L) {
  int argc;
  int argv[6]={
    1,2,3,4,5,6
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_SmartBody_applyImpulse__SWIG_0(L);
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isnumber(L,argv[4]);
            }
            if (_v) {
              return _wrap_SmartBody_applyImpulse__SWIG_1(L);
            }
          }
        }
      }
    }
  }
  
  lua_pushstring(L,"No matching function for overloaded 'SmartBody_applyImpulse'");
  lua_error(L);return 0;
}


static int _wrap_SmartBody_applyForce__SWIG_0(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("applyForce",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("applyForce",1,"boost::shared_ptr< love_box2d::Body > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("applyForce",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("applyForce",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_applyForce",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (*arg1)->applyForce(arg2,arg3);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_applyForce__SWIG_1(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  float arg2 ;
  float arg3 ;
  float arg4 ;
  float arg5 ;
  
  SWIG_check_num_args("applyForce",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("applyForce",1,"boost::shared_ptr< love_box2d::Body > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("applyForce",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("applyForce",3,"float");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("applyForce",4,"float");
  if(!lua_isnumber(L,5)) SWIG_fail_arg("applyForce",5,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_applyForce",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (float)lua_tonumber(L, 4);
  arg5 = (float)lua_tonumber(L, 5);
  (*arg1)->applyForce(arg2,arg3,arg4,arg5);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_applyForce(lua_State* L) {
  int argc;
  int argv[6]={
    1,2,3,4,5,6
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_SmartBody_applyForce__SWIG_0(L);
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isnumber(L,argv[4]);
            }
            if (_v) {
              return _wrap_SmartBody_applyForce__SWIG_1(L);
            }
          }
        }
      }
    }
  }
  
  lua_pushstring(L,"No matching function for overloaded 'SmartBody_applyForce'");
  lua_error(L);return 0;
}


static int _wrap_SmartBody_applyTorque(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("applyTorque",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("applyTorque",1,"boost::shared_ptr< love_box2d::Body > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("applyTorque",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_applyTorque",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->applyTorque(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_setX(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setX",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setX",1,"boost::shared_ptr< love_box2d::Body > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setX",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_setX",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setX(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_setY(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setY",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setY",1,"boost::shared_ptr< love_box2d::Body > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setY",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_setY",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setY(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_setPosition(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("setPosition",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setPosition",1,"boost::shared_ptr< love_box2d::Body > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setPosition",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("setPosition",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_setPosition",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (*arg1)->setPosition(arg2,arg3);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_setVelocity(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("setVelocity",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setVelocity",1,"boost::shared_ptr< love_box2d::Body > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setVelocity",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("setVelocity",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_setVelocity",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (*arg1)->setVelocity(arg2,arg3);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_setAngle(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setAngle",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setAngle",1,"boost::shared_ptr< love_box2d::Body > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setAngle",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_setAngle",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setAngle(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_setSpin(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setSpin",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setSpin",1,"boost::shared_ptr< love_box2d::Body > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setSpin",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_setSpin",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setSpin(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_setMassFromShapes(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  
  SWIG_check_num_args("setMassFromShapes",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setMassFromShapes",1,"boost::shared_ptr< love_box2d::Body > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_setMassFromShapes",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  (*arg1)->setMassFromShapes();
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_setMass(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  float arg2 ;
  float arg3 ;
  float arg4 ;
  float arg5 ;
  
  SWIG_check_num_args("setMass",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setMass",1,"boost::shared_ptr< love_box2d::Body > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setMass",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("setMass",3,"float");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("setMass",4,"float");
  if(!lua_isnumber(L,5)) SWIG_fail_arg("setMass",5,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_setMass",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (float)lua_tonumber(L, 4);
  arg5 = (float)lua_tonumber(L, 5);
  (*arg1)->setMass(arg2,arg3,arg4,arg5);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_setAngularDamping(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setAngularDamping",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setAngularDamping",1,"boost::shared_ptr< love_box2d::Body > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setAngularDamping",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_setAngularDamping",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setAngularDamping(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_setDamping(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setDamping",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setDamping",1,"boost::shared_ptr< love_box2d::Body > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setDamping",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_setDamping",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setDamping(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_isBullet(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  bool result;
  
  SWIG_check_num_args("isBullet",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("isBullet",1,"boost::shared_ptr< love_box2d::Body > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_isBullet",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  result = (bool)(*arg1)->isBullet();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_setBullet(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("setBullet",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setBullet",1,"boost::shared_ptr< love_box2d::Body > *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("setBullet",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_setBullet",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (*arg1)->setBullet(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_isStatic(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  bool result;
  
  SWIG_check_num_args("isStatic",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("isStatic",1,"boost::shared_ptr< love_box2d::Body > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_isStatic",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  result = (bool)(*arg1)->isStatic();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_isDynamic(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  bool result;
  
  SWIG_check_num_args("isDynamic",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("isDynamic",1,"boost::shared_ptr< love_box2d::Body > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_isDynamic",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  result = (bool)(*arg1)->isDynamic();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_isFrozen(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  bool result;
  
  SWIG_check_num_args("isFrozen",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("isFrozen",1,"boost::shared_ptr< love_box2d::Body > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_isFrozen",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  result = (bool)(*arg1)->isFrozen();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_isSleeping(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  bool result;
  
  SWIG_check_num_args("isSleeping",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("isSleeping",1,"boost::shared_ptr< love_box2d::Body > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_isSleeping",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  result = (bool)(*arg1)->isSleeping();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_setAllowSleep(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("setAllowSleep",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setAllowSleep",1,"boost::shared_ptr< love_box2d::Body > *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("setAllowSleep",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_setAllowSleep",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (*arg1)->setAllowSleep(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartBody_setSleep(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("setSleep",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setSleep",1,"boost::shared_ptr< love_box2d::Body > *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("setSleep",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("SmartBody_setSleep",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (*arg1)->setSleep(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_SmartBody(void *obj) {
boost::shared_ptr< love_box2d::Body > *arg1 = (boost::shared_ptr< love_box2d::Body > *) obj;
delete arg1;
}
static swig_lua_method swig_boost_shared_ptr_Sl_love_box2d_Body_Sg__methods[] = {
	{"getLocalPoint", love_box2d::_wrap_method_Body_getLocalPoint},
	{"getLocalCenter", love_box2d::_wrap_method_Body_getLocalCenter},
	{"getWorldPoint", love_box2d::_wrap_method_Body_getWorldPoint},
	{"getLocalVector", love_box2d::_wrap_method_Body_getLocalVector},
	{"getVelocityLocalPoint", love_box2d::_wrap_method_Body_getVelocityLocalPoint},
	{"getVelocityWorldPoint", love_box2d::_wrap_method_Body_getVelocityWorldPoint},
	{"getPosition", love_box2d::_wrap_method_Body_getPosition},
	{"getVelocity", love_box2d::_wrap_method_Body_getVelocity},
	{"getWorldVector", love_box2d::_wrap_method_Body_getWorldVector},
	{"getWorldCenter", love_box2d::_wrap_method_Body_getWorldCenter},
	{"destroy", love_box2d::_wrap_method_Body_destroy},
    {"__deref__", _wrap_SmartBody___deref__}, 
    {"getX", _wrap_SmartBody_getX}, 
    {"getY", _wrap_SmartBody_getY}, 
    {"getAngle", _wrap_SmartBody_getAngle}, 
    {"getSpin", _wrap_SmartBody_getSpin}, 
    {"getMass", _wrap_SmartBody_getMass}, 
    {"getInertia", _wrap_SmartBody_getInertia}, 
    {"getAngularDamping", _wrap_SmartBody_getAngularDamping}, 
    {"getDamping", _wrap_SmartBody_getDamping}, 
    {"applyImpulse", _wrap_SmartBody_applyImpulse}, 
    {"applyForce", _wrap_SmartBody_applyForce}, 
    {"applyTorque", _wrap_SmartBody_applyTorque}, 
    {"setX", _wrap_SmartBody_setX}, 
    {"setY", _wrap_SmartBody_setY}, 
    {"setPosition", _wrap_SmartBody_setPosition}, 
    {"setVelocity", _wrap_SmartBody_setVelocity}, 
    {"setAngle", _wrap_SmartBody_setAngle}, 
    {"setSpin", _wrap_SmartBody_setSpin}, 
    {"setMassFromShapes", _wrap_SmartBody_setMassFromShapes}, 
    {"setMass", _wrap_SmartBody_setMass}, 
    {"setAngularDamping", _wrap_SmartBody_setAngularDamping}, 
    {"setDamping", _wrap_SmartBody_setDamping}, 
    {"isBullet", _wrap_SmartBody_isBullet}, 
    {"setBullet", _wrap_SmartBody_setBullet}, 
    {"isStatic", _wrap_SmartBody_isStatic}, 
    {"isDynamic", _wrap_SmartBody_isDynamic}, 
    {"isFrozen", _wrap_SmartBody_isFrozen}, 
    {"isSleeping", _wrap_SmartBody_isSleeping}, 
    {"setAllowSleep", _wrap_SmartBody_setAllowSleep}, 
    {"setSleep", _wrap_SmartBody_setSleep}, 
    {0,0}
};
static swig_lua_attribute swig_boost_shared_ptr_Sl_love_box2d_Body_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_boost_shared_ptr_Sl_love_box2d_Body_Sg__bases[] = {0};
static const char *swig_boost_shared_ptr_Sl_love_box2d_Body_Sg__base_names[] = {0};
static swig_lua_class _wrap_class_boost_shared_ptr_Sl_love_box2d_Body_Sg_ = { "SmartBody", &SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0, swig_delete_SmartBody, swig_boost_shared_ptr_Sl_love_box2d_Body_Sg__methods, swig_boost_shared_ptr_Sl_love_box2d_Body_Sg__attributes, swig_boost_shared_ptr_Sl_love_box2d_Body_Sg__bases, swig_boost_shared_ptr_Sl_love_box2d_Body_Sg__base_names };

static int _wrap_Shape_getType(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Shape *arg1 = (love_box2d::Shape *) 0 ;
  int result;
  
  SWIG_check_num_args("getType",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getType",1,"love_box2d::Shape const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Shape,0))){
    SWIG_fail_ptr("Shape_getType",1,SWIGTYPE_p_love_box2d__Shape);
  }
  
  result = (int)((love_box2d::Shape const *)arg1)->getType();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Shape_setFriction(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Shape *arg1 = (love_box2d::Shape *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setFriction",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setFriction",1,"love_box2d::Shape *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setFriction",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Shape,0))){
    SWIG_fail_ptr("Shape_setFriction",1,SWIGTYPE_p_love_box2d__Shape);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->setFriction(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Shape_setRestitution(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Shape *arg1 = (love_box2d::Shape *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setRestitution",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setRestitution",1,"love_box2d::Shape *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setRestitution",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Shape,0))){
    SWIG_fail_ptr("Shape_setRestitution",1,SWIGTYPE_p_love_box2d__Shape);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->setRestitution(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Shape_setDensity(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Shape *arg1 = (love_box2d::Shape *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setDensity",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setDensity",1,"love_box2d::Shape *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setDensity",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Shape,0))){
    SWIG_fail_ptr("Shape_setDensity",1,SWIGTYPE_p_love_box2d__Shape);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->setDensity(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Shape_setSensor(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Shape *arg1 = (love_box2d::Shape *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("setSensor",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setSensor",1,"love_box2d::Shape *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("setSensor",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Shape,0))){
    SWIG_fail_ptr("Shape_setSensor",1,SWIGTYPE_p_love_box2d__Shape);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (arg1)->setSensor(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Shape_getFriction(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Shape *arg1 = (love_box2d::Shape *) 0 ;
  float result;
  
  SWIG_check_num_args("getFriction",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getFriction",1,"love_box2d::Shape const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Shape,0))){
    SWIG_fail_ptr("Shape_getFriction",1,SWIGTYPE_p_love_box2d__Shape);
  }
  
  result = (float)((love_box2d::Shape const *)arg1)->getFriction();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Shape_getRestituion(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Shape *arg1 = (love_box2d::Shape *) 0 ;
  float result;
  
  SWIG_check_num_args("getRestituion",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getRestituion",1,"love_box2d::Shape const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Shape,0))){
    SWIG_fail_ptr("Shape_getRestituion",1,SWIGTYPE_p_love_box2d__Shape);
  }
  
  result = (float)((love_box2d::Shape const *)arg1)->getRestituion();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Shape_getDensity(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Shape *arg1 = (love_box2d::Shape *) 0 ;
  float result;
  
  SWIG_check_num_args("getDensity",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getDensity",1,"love_box2d::Shape const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Shape,0))){
    SWIG_fail_ptr("Shape_getDensity",1,SWIGTYPE_p_love_box2d__Shape);
  }
  
  result = (float)((love_box2d::Shape const *)arg1)->getDensity();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Shape_isSensor(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Shape *arg1 = (love_box2d::Shape *) 0 ;
  bool result;
  
  SWIG_check_num_args("isSensor",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("isSensor",1,"love_box2d::Shape const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Shape,0))){
    SWIG_fail_ptr("Shape_isSensor",1,SWIGTYPE_p_love_box2d__Shape);
  }
  
  result = (bool)((love_box2d::Shape const *)arg1)->isSensor();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Shape_getBody(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Shape *arg1 = (love_box2d::Shape *) 0 ;
  boost::shared_ptr< love_box2d::Body > result;
  
  SWIG_check_num_args("getBody",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getBody",1,"love_box2d::Shape const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Shape,0))){
    SWIG_fail_ptr("Shape_getBody",1,SWIGTYPE_p_love_box2d__Shape);
  }
  
  result = ((love_box2d::Shape const *)arg1)->getBody();
  SWIG_arg=0;
  {
    boost::shared_ptr< love_box2d::Body > * resultptr = new boost::shared_ptr< love_box2d::Body >((boost::shared_ptr< love_box2d::Body > &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Shape_testPoint(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Shape *arg1 = (love_box2d::Shape *) 0 ;
  float arg2 ;
  float arg3 ;
  bool result;
  
  SWIG_check_num_args("testPoint",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("testPoint",1,"love_box2d::Shape const *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("testPoint",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("testPoint",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Shape,0))){
    SWIG_fail_ptr("Shape_testPoint",1,SWIGTYPE_p_love_box2d__Shape);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  result = (bool)((love_box2d::Shape const *)arg1)->testPoint(arg2,arg3);
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Shape_setCategoryBits(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Shape *arg1 = (love_box2d::Shape *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("setCategoryBits",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setCategoryBits",1,"love_box2d::Shape *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setCategoryBits",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Shape,0))){
    SWIG_fail_ptr("Shape_setCategoryBits",1,SWIGTYPE_p_love_box2d__Shape);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  (arg1)->setCategoryBits(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Shape_getCategoryBits(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Shape *arg1 = (love_box2d::Shape *) 0 ;
  int result;
  
  SWIG_check_num_args("getCategoryBits",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getCategoryBits",1,"love_box2d::Shape const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Shape,0))){
    SWIG_fail_ptr("Shape_getCategoryBits",1,SWIGTYPE_p_love_box2d__Shape);
  }
  
  result = (int)((love_box2d::Shape const *)arg1)->getCategoryBits();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Shape_setMaskBits(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Shape *arg1 = (love_box2d::Shape *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("setMaskBits",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setMaskBits",1,"love_box2d::Shape *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setMaskBits",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Shape,0))){
    SWIG_fail_ptr("Shape_setMaskBits",1,SWIGTYPE_p_love_box2d__Shape);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  (arg1)->setMaskBits(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Shape_getMaskBits(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Shape *arg1 = (love_box2d::Shape *) 0 ;
  int result;
  
  SWIG_check_num_args("getMaskBits",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getMaskBits",1,"love_box2d::Shape const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Shape,0))){
    SWIG_fail_ptr("Shape_getMaskBits",1,SWIGTYPE_p_love_box2d__Shape);
  }
  
  result = (int)((love_box2d::Shape const *)arg1)->getMaskBits();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_delete_Shape(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Shape *arg1 = (love_box2d::Shape *) 0 ;
  
  SWIG_check_num_args("love_box2d::Shape::~Shape",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("love_box2d::Shape::~Shape",1,"love_box2d::Shape *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Shape,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("delete_Shape",1,SWIGTYPE_p_love_box2d__Shape);
  }
  
  delete arg1;
  
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Shape(void *obj) {
love_box2d::Shape *arg1 = (love_box2d::Shape *) obj;
delete arg1;
}
static swig_lua_method swig_love_box2d_Shape_methods[] = {
    {"getType", _wrap_Shape_getType}, 
    {"setFriction", _wrap_Shape_setFriction}, 
    {"setRestitution", _wrap_Shape_setRestitution}, 
    {"setDensity", _wrap_Shape_setDensity}, 
    {"setSensor", _wrap_Shape_setSensor}, 
    {"getFriction", _wrap_Shape_getFriction}, 
    {"getRestituion", _wrap_Shape_getRestituion}, 
    {"getDensity", _wrap_Shape_getDensity}, 
    {"isSensor", _wrap_Shape_isSensor}, 
    {"getBody", _wrap_Shape_getBody}, 
    {"testPoint", _wrap_Shape_testPoint}, 
    {"setCategoryBits", _wrap_Shape_setCategoryBits}, 
    {"getCategoryBits", _wrap_Shape_getCategoryBits}, 
    {"setMaskBits", _wrap_Shape_setMaskBits}, 
    {"getMaskBits", _wrap_Shape_getMaskBits}, 
    {0,0}
};
static swig_lua_attribute swig_love_box2d_Shape_attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_love_box2d_Shape_bases[] = {0};
static const char *swig_love_box2d_Shape_base_names[] = {0};
static swig_lua_class _wrap_class_love_box2d_Shape = { "Shape", &SWIGTYPE_p_love_box2d__Shape,0, swig_delete_Shape, swig_love_box2d_Shape_methods, swig_love_box2d_Shape_attributes, swig_love_box2d_Shape_bases, swig_love_box2d_Shape_base_names };

static int _wrap_SmartShape___deref__(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Shape > *arg1 = (boost::shared_ptr< love_box2d::Shape > *) 0 ;
  love_box2d::Shape *result = 0 ;
  
  SWIG_check_num_args("operator ->",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("operator ->",1,"boost::shared_ptr< love_box2d::Shape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t,0))){
    SWIG_fail_ptr("SmartShape___deref__",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t);
  }
  
  result = (love_box2d::Shape *)((boost::shared_ptr< love_box2d::Shape > const *)arg1)->operator ->();
  SWIG_arg=0;
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_love_box2d__Shape,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_delete_SmartShape(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Shape > *arg1 = (boost::shared_ptr< love_box2d::Shape > *) 0 ;
  
  SWIG_check_num_args("boost::shared_ptr<(love_box2d::Shape)>::~shared_ptr<(love_box2d::Shape)>",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("boost::shared_ptr<(love_box2d::Shape)>::~shared_ptr<(love_box2d::Shape)>",1,"boost::shared_ptr< love_box2d::Shape > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("delete_SmartShape",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t);
  }
  
  delete arg1;
  
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartShape_getType(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Shape > *arg1 = (boost::shared_ptr< love_box2d::Shape > *) 0 ;
  int result;
  
  SWIG_check_num_args("getType",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getType",1,"boost::shared_ptr< love_box2d::Shape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t,0))){
    SWIG_fail_ptr("SmartShape_getType",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t);
  }
  
  result = (int)(*arg1)->getType();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartShape_setFriction(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Shape > *arg1 = (boost::shared_ptr< love_box2d::Shape > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setFriction",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setFriction",1,"boost::shared_ptr< love_box2d::Shape > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setFriction",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t,0))){
    SWIG_fail_ptr("SmartShape_setFriction",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setFriction(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartShape_setRestitution(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Shape > *arg1 = (boost::shared_ptr< love_box2d::Shape > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setRestitution",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setRestitution",1,"boost::shared_ptr< love_box2d::Shape > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setRestitution",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t,0))){
    SWIG_fail_ptr("SmartShape_setRestitution",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setRestitution(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartShape_setDensity(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Shape > *arg1 = (boost::shared_ptr< love_box2d::Shape > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setDensity",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setDensity",1,"boost::shared_ptr< love_box2d::Shape > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setDensity",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t,0))){
    SWIG_fail_ptr("SmartShape_setDensity",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setDensity(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartShape_setSensor(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Shape > *arg1 = (boost::shared_ptr< love_box2d::Shape > *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("setSensor",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setSensor",1,"boost::shared_ptr< love_box2d::Shape > *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("setSensor",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t,0))){
    SWIG_fail_ptr("SmartShape_setSensor",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (*arg1)->setSensor(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartShape_getFriction(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Shape > *arg1 = (boost::shared_ptr< love_box2d::Shape > *) 0 ;
  float result;
  
  SWIG_check_num_args("getFriction",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getFriction",1,"boost::shared_ptr< love_box2d::Shape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t,0))){
    SWIG_fail_ptr("SmartShape_getFriction",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t);
  }
  
  result = (float)(*arg1)->getFriction();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartShape_getRestituion(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Shape > *arg1 = (boost::shared_ptr< love_box2d::Shape > *) 0 ;
  float result;
  
  SWIG_check_num_args("getRestituion",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getRestituion",1,"boost::shared_ptr< love_box2d::Shape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t,0))){
    SWIG_fail_ptr("SmartShape_getRestituion",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t);
  }
  
  result = (float)(*arg1)->getRestituion();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartShape_getDensity(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Shape > *arg1 = (boost::shared_ptr< love_box2d::Shape > *) 0 ;
  float result;
  
  SWIG_check_num_args("getDensity",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getDensity",1,"boost::shared_ptr< love_box2d::Shape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t,0))){
    SWIG_fail_ptr("SmartShape_getDensity",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t);
  }
  
  result = (float)(*arg1)->getDensity();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartShape_isSensor(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Shape > *arg1 = (boost::shared_ptr< love_box2d::Shape > *) 0 ;
  bool result;
  
  SWIG_check_num_args("isSensor",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("isSensor",1,"boost::shared_ptr< love_box2d::Shape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t,0))){
    SWIG_fail_ptr("SmartShape_isSensor",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t);
  }
  
  result = (bool)(*arg1)->isSensor();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartShape_getBody(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Shape > *arg1 = (boost::shared_ptr< love_box2d::Shape > *) 0 ;
  boost::shared_ptr< love_box2d::Body > result;
  
  SWIG_check_num_args("getBody",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getBody",1,"boost::shared_ptr< love_box2d::Shape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t,0))){
    SWIG_fail_ptr("SmartShape_getBody",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t);
  }
  
  result = (*arg1)->getBody();
  SWIG_arg=0;
  {
    boost::shared_ptr< love_box2d::Body > * resultptr = new boost::shared_ptr< love_box2d::Body >((boost::shared_ptr< love_box2d::Body > &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartShape_testPoint(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Shape > *arg1 = (boost::shared_ptr< love_box2d::Shape > *) 0 ;
  float arg2 ;
  float arg3 ;
  bool result;
  
  SWIG_check_num_args("testPoint",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("testPoint",1,"boost::shared_ptr< love_box2d::Shape > const *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("testPoint",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("testPoint",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t,0))){
    SWIG_fail_ptr("SmartShape_testPoint",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  result = (bool)(*arg1)->testPoint(arg2,arg3);
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartShape_setCategoryBits(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Shape > *arg1 = (boost::shared_ptr< love_box2d::Shape > *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("setCategoryBits",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setCategoryBits",1,"boost::shared_ptr< love_box2d::Shape > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setCategoryBits",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t,0))){
    SWIG_fail_ptr("SmartShape_setCategoryBits",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  (*arg1)->setCategoryBits(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartShape_getCategoryBits(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Shape > *arg1 = (boost::shared_ptr< love_box2d::Shape > *) 0 ;
  int result;
  
  SWIG_check_num_args("getCategoryBits",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getCategoryBits",1,"boost::shared_ptr< love_box2d::Shape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t,0))){
    SWIG_fail_ptr("SmartShape_getCategoryBits",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t);
  }
  
  result = (int)(*arg1)->getCategoryBits();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartShape_setMaskBits(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Shape > *arg1 = (boost::shared_ptr< love_box2d::Shape > *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("setMaskBits",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setMaskBits",1,"boost::shared_ptr< love_box2d::Shape > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setMaskBits",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t,0))){
    SWIG_fail_ptr("SmartShape_setMaskBits",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  (*arg1)->setMaskBits(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartShape_getMaskBits(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Shape > *arg1 = (boost::shared_ptr< love_box2d::Shape > *) 0 ;
  int result;
  
  SWIG_check_num_args("getMaskBits",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getMaskBits",1,"boost::shared_ptr< love_box2d::Shape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t,0))){
    SWIG_fail_ptr("SmartShape_getMaskBits",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t);
  }
  
  result = (int)(*arg1)->getMaskBits();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_SmartShape(void *obj) {
boost::shared_ptr< love_box2d::Shape > *arg1 = (boost::shared_ptr< love_box2d::Shape > *) obj;
delete arg1;
}
static swig_lua_method swig_boost_shared_ptr_Sl_love_box2d_Shape_Sg__methods[] = {
    {"__deref__", _wrap_SmartShape___deref__}, 
    {"getType", _wrap_SmartShape_getType}, 
    {"setFriction", _wrap_SmartShape_setFriction}, 
    {"setRestitution", _wrap_SmartShape_setRestitution}, 
    {"setDensity", _wrap_SmartShape_setDensity}, 
    {"setSensor", _wrap_SmartShape_setSensor}, 
    {"getFriction", _wrap_SmartShape_getFriction}, 
    {"getRestituion", _wrap_SmartShape_getRestituion}, 
    {"getDensity", _wrap_SmartShape_getDensity}, 
    {"isSensor", _wrap_SmartShape_isSensor}, 
    {"getBody", _wrap_SmartShape_getBody}, 
    {"testPoint", _wrap_SmartShape_testPoint}, 
    {"setCategoryBits", _wrap_SmartShape_setCategoryBits}, 
    {"getCategoryBits", _wrap_SmartShape_getCategoryBits}, 
    {"setMaskBits", _wrap_SmartShape_setMaskBits}, 
    {"getMaskBits", _wrap_SmartShape_getMaskBits}, 
    {0,0}
};
static swig_lua_attribute swig_boost_shared_ptr_Sl_love_box2d_Shape_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_boost_shared_ptr_Sl_love_box2d_Shape_Sg__bases[] = {0};
static const char *swig_boost_shared_ptr_Sl_love_box2d_Shape_Sg__base_names[] = {0};
static swig_lua_class _wrap_class_boost_shared_ptr_Sl_love_box2d_Shape_Sg_ = { "SmartShape", &SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t,0, swig_delete_SmartShape, swig_boost_shared_ptr_Sl_love_box2d_Shape_Sg__methods, swig_boost_shared_ptr_Sl_love_box2d_Shape_Sg__attributes, swig_boost_shared_ptr_Sl_love_box2d_Shape_Sg__bases, swig_boost_shared_ptr_Sl_love_box2d_Shape_Sg__base_names };

static int _wrap_CircleShape_getRadius(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::CircleShape *arg1 = (love_box2d::CircleShape *) 0 ;
  float result;
  
  SWIG_check_num_args("getRadius",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getRadius",1,"love_box2d::CircleShape const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__CircleShape,0))){
    SWIG_fail_ptr("CircleShape_getRadius",1,SWIGTYPE_p_love_box2d__CircleShape);
  }
  
  result = (float)((love_box2d::CircleShape const *)arg1)->getRadius();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_delete_CircleShape(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::CircleShape *arg1 = (love_box2d::CircleShape *) 0 ;
  
  SWIG_check_num_args("love_box2d::CircleShape::~CircleShape",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("love_box2d::CircleShape::~CircleShape",1,"love_box2d::CircleShape *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__CircleShape,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("delete_CircleShape",1,SWIGTYPE_p_love_box2d__CircleShape);
  }
  
  delete arg1;
  
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_CircleShape(void *obj) {
love_box2d::CircleShape *arg1 = (love_box2d::CircleShape *) obj;
delete arg1;
}
static swig_lua_method swig_love_box2d_CircleShape_methods[] = {
    {"getRadius", _wrap_CircleShape_getRadius}, 
    {0,0}
};
static swig_lua_attribute swig_love_box2d_CircleShape_attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_love_box2d_CircleShape_bases[] = {0,0};
static const char *swig_love_box2d_CircleShape_base_names[] = {"love_box2d::Shape *",0};
static swig_lua_class _wrap_class_love_box2d_CircleShape = { "CircleShape", &SWIGTYPE_p_love_box2d__CircleShape,0, swig_delete_CircleShape, swig_love_box2d_CircleShape_methods, swig_love_box2d_CircleShape_attributes, swig_love_box2d_CircleShape_bases, swig_love_box2d_CircleShape_base_names };

static int _wrap_SmartCircleShape___deref__(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::CircleShape > *arg1 = (boost::shared_ptr< love_box2d::CircleShape > *) 0 ;
  love_box2d::CircleShape *result = 0 ;
  
  SWIG_check_num_args("operator ->",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("operator ->",1,"boost::shared_ptr< love_box2d::CircleShape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,0))){
    SWIG_fail_ptr("SmartCircleShape___deref__",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t);
  }
  
  result = (love_box2d::CircleShape *)((boost::shared_ptr< love_box2d::CircleShape > const *)arg1)->operator ->();
  SWIG_arg=0;
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_love_box2d__CircleShape,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_delete_SmartCircleShape(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::CircleShape > *arg1 = (boost::shared_ptr< love_box2d::CircleShape > *) 0 ;
  
  SWIG_check_num_args("boost::shared_ptr<(love_box2d::CircleShape)>::~shared_ptr<(love_box2d::CircleShape)>",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("boost::shared_ptr<(love_box2d::CircleShape)>::~shared_ptr<(love_box2d::CircleShape)>",1,"boost::shared_ptr< love_box2d::CircleShape > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("delete_SmartCircleShape",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t);
  }
  
  delete arg1;
  
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartCircleShape_getRadius(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::CircleShape > *arg1 = (boost::shared_ptr< love_box2d::CircleShape > *) 0 ;
  float result;
  
  SWIG_check_num_args("getRadius",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getRadius",1,"boost::shared_ptr< love_box2d::CircleShape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,0))){
    SWIG_fail_ptr("SmartCircleShape_getRadius",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t);
  }
  
  result = (float)(*arg1)->getRadius();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartCircleShape_getType(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::CircleShape > *arg1 = (boost::shared_ptr< love_box2d::CircleShape > *) 0 ;
  int result;
  
  SWIG_check_num_args("getType",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getType",1,"boost::shared_ptr< love_box2d::CircleShape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,0))){
    SWIG_fail_ptr("SmartCircleShape_getType",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t);
  }
  
  result = (int)(*arg1)->getType();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartCircleShape_setFriction(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::CircleShape > *arg1 = (boost::shared_ptr< love_box2d::CircleShape > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setFriction",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setFriction",1,"boost::shared_ptr< love_box2d::CircleShape > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setFriction",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,0))){
    SWIG_fail_ptr("SmartCircleShape_setFriction",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setFriction(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartCircleShape_setRestitution(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::CircleShape > *arg1 = (boost::shared_ptr< love_box2d::CircleShape > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setRestitution",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setRestitution",1,"boost::shared_ptr< love_box2d::CircleShape > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setRestitution",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,0))){
    SWIG_fail_ptr("SmartCircleShape_setRestitution",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setRestitution(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartCircleShape_setDensity(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::CircleShape > *arg1 = (boost::shared_ptr< love_box2d::CircleShape > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setDensity",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setDensity",1,"boost::shared_ptr< love_box2d::CircleShape > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setDensity",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,0))){
    SWIG_fail_ptr("SmartCircleShape_setDensity",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setDensity(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartCircleShape_setSensor(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::CircleShape > *arg1 = (boost::shared_ptr< love_box2d::CircleShape > *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("setSensor",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setSensor",1,"boost::shared_ptr< love_box2d::CircleShape > *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("setSensor",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,0))){
    SWIG_fail_ptr("SmartCircleShape_setSensor",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (*arg1)->setSensor(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartCircleShape_getFriction(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::CircleShape > *arg1 = (boost::shared_ptr< love_box2d::CircleShape > *) 0 ;
  float result;
  
  SWIG_check_num_args("getFriction",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getFriction",1,"boost::shared_ptr< love_box2d::CircleShape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,0))){
    SWIG_fail_ptr("SmartCircleShape_getFriction",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t);
  }
  
  result = (float)(*arg1)->getFriction();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartCircleShape_getRestituion(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::CircleShape > *arg1 = (boost::shared_ptr< love_box2d::CircleShape > *) 0 ;
  float result;
  
  SWIG_check_num_args("getRestituion",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getRestituion",1,"boost::shared_ptr< love_box2d::CircleShape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,0))){
    SWIG_fail_ptr("SmartCircleShape_getRestituion",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t);
  }
  
  result = (float)(*arg1)->getRestituion();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartCircleShape_getDensity(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::CircleShape > *arg1 = (boost::shared_ptr< love_box2d::CircleShape > *) 0 ;
  float result;
  
  SWIG_check_num_args("getDensity",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getDensity",1,"boost::shared_ptr< love_box2d::CircleShape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,0))){
    SWIG_fail_ptr("SmartCircleShape_getDensity",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t);
  }
  
  result = (float)(*arg1)->getDensity();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartCircleShape_isSensor(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::CircleShape > *arg1 = (boost::shared_ptr< love_box2d::CircleShape > *) 0 ;
  bool result;
  
  SWIG_check_num_args("isSensor",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("isSensor",1,"boost::shared_ptr< love_box2d::CircleShape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,0))){
    SWIG_fail_ptr("SmartCircleShape_isSensor",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t);
  }
  
  result = (bool)(*arg1)->isSensor();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartCircleShape_getBody(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::CircleShape > *arg1 = (boost::shared_ptr< love_box2d::CircleShape > *) 0 ;
  boost::shared_ptr< love_box2d::Body > result;
  
  SWIG_check_num_args("getBody",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getBody",1,"boost::shared_ptr< love_box2d::CircleShape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,0))){
    SWIG_fail_ptr("SmartCircleShape_getBody",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t);
  }
  
  result = (*arg1)->getBody();
  SWIG_arg=0;
  {
    boost::shared_ptr< love_box2d::Body > * resultptr = new boost::shared_ptr< love_box2d::Body >((boost::shared_ptr< love_box2d::Body > &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartCircleShape_testPoint(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::CircleShape > *arg1 = (boost::shared_ptr< love_box2d::CircleShape > *) 0 ;
  float arg2 ;
  float arg3 ;
  bool result;
  
  SWIG_check_num_args("testPoint",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("testPoint",1,"boost::shared_ptr< love_box2d::CircleShape > const *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("testPoint",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("testPoint",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,0))){
    SWIG_fail_ptr("SmartCircleShape_testPoint",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  result = (bool)(*arg1)->testPoint(arg2,arg3);
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartCircleShape_setCategoryBits(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::CircleShape > *arg1 = (boost::shared_ptr< love_box2d::CircleShape > *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("setCategoryBits",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setCategoryBits",1,"boost::shared_ptr< love_box2d::CircleShape > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setCategoryBits",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,0))){
    SWIG_fail_ptr("SmartCircleShape_setCategoryBits",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  (*arg1)->setCategoryBits(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartCircleShape_getCategoryBits(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::CircleShape > *arg1 = (boost::shared_ptr< love_box2d::CircleShape > *) 0 ;
  int result;
  
  SWIG_check_num_args("getCategoryBits",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getCategoryBits",1,"boost::shared_ptr< love_box2d::CircleShape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,0))){
    SWIG_fail_ptr("SmartCircleShape_getCategoryBits",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t);
  }
  
  result = (int)(*arg1)->getCategoryBits();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartCircleShape_setMaskBits(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::CircleShape > *arg1 = (boost::shared_ptr< love_box2d::CircleShape > *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("setMaskBits",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setMaskBits",1,"boost::shared_ptr< love_box2d::CircleShape > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setMaskBits",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,0))){
    SWIG_fail_ptr("SmartCircleShape_setMaskBits",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  (*arg1)->setMaskBits(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartCircleShape_getMaskBits(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::CircleShape > *arg1 = (boost::shared_ptr< love_box2d::CircleShape > *) 0 ;
  int result;
  
  SWIG_check_num_args("getMaskBits",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getMaskBits",1,"boost::shared_ptr< love_box2d::CircleShape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,0))){
    SWIG_fail_ptr("SmartCircleShape_getMaskBits",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t);
  }
  
  result = (int)(*arg1)->getMaskBits();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_SmartCircleShape(void *obj) {
boost::shared_ptr< love_box2d::CircleShape > *arg1 = (boost::shared_ptr< love_box2d::CircleShape > *) obj;
delete arg1;
}
static swig_lua_method swig_boost_shared_ptr_Sl_love_box2d_CircleShape_Sg__methods[] = {
	{"getCategory", love_box2d::_wrap_method_CircleShape_getCategory},
	{"getData", love_box2d::_wrap_method_CircleShape_getData},
	{"testSegment", love_box2d::_wrap_method_CircleShape_testSegment},
	{"getBoundingBox", love_box2d::_wrap_method_CircleShape_getBoundingBox},
	{"setCategory", love_box2d::_wrap_method_CircleShape_setCategory},
	{"setData", love_box2d::_wrap_method_CircleShape_setData},
	{"getMask", love_box2d::_wrap_method_CircleShape_getMask},
	{"setMask", love_box2d::_wrap_method_CircleShape_setMask},
	{"destroy", love_box2d::_wrap_method_CircleShape_destroy},
    {"__deref__", _wrap_SmartCircleShape___deref__}, 
    {"getRadius", _wrap_SmartCircleShape_getRadius}, 
    {"getType", _wrap_SmartCircleShape_getType}, 
    {"setFriction", _wrap_SmartCircleShape_setFriction}, 
    {"setRestitution", _wrap_SmartCircleShape_setRestitution}, 
    {"setDensity", _wrap_SmartCircleShape_setDensity}, 
    {"setSensor", _wrap_SmartCircleShape_setSensor}, 
    {"getFriction", _wrap_SmartCircleShape_getFriction}, 
    {"getRestituion", _wrap_SmartCircleShape_getRestituion}, 
    {"getDensity", _wrap_SmartCircleShape_getDensity}, 
    {"isSensor", _wrap_SmartCircleShape_isSensor}, 
    {"getBody", _wrap_SmartCircleShape_getBody}, 
    {"testPoint", _wrap_SmartCircleShape_testPoint}, 
    {"setCategoryBits", _wrap_SmartCircleShape_setCategoryBits}, 
    {"getCategoryBits", _wrap_SmartCircleShape_getCategoryBits}, 
    {"setMaskBits", _wrap_SmartCircleShape_setMaskBits}, 
    {"getMaskBits", _wrap_SmartCircleShape_getMaskBits}, 
    {0,0}
};
static swig_lua_attribute swig_boost_shared_ptr_Sl_love_box2d_CircleShape_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_boost_shared_ptr_Sl_love_box2d_CircleShape_Sg__bases[] = {0};
static const char *swig_boost_shared_ptr_Sl_love_box2d_CircleShape_Sg__base_names[] = {0};
static swig_lua_class _wrap_class_boost_shared_ptr_Sl_love_box2d_CircleShape_Sg_ = { "SmartCircleShape", &SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,0, swig_delete_SmartCircleShape, swig_boost_shared_ptr_Sl_love_box2d_CircleShape_Sg__methods, swig_boost_shared_ptr_Sl_love_box2d_CircleShape_Sg__attributes, swig_boost_shared_ptr_Sl_love_box2d_CircleShape_Sg__bases, swig_boost_shared_ptr_Sl_love_box2d_CircleShape_Sg__base_names };

static int _wrap_delete_PolygonShape(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::PolygonShape *arg1 = (love_box2d::PolygonShape *) 0 ;
  
  SWIG_check_num_args("love_box2d::PolygonShape::~PolygonShape",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("love_box2d::PolygonShape::~PolygonShape",1,"love_box2d::PolygonShape *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__PolygonShape,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("delete_PolygonShape",1,SWIGTYPE_p_love_box2d__PolygonShape);
  }
  
  delete arg1;
  
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_PolygonShape(void *obj) {
love_box2d::PolygonShape *arg1 = (love_box2d::PolygonShape *) obj;
delete arg1;
}
static swig_lua_method swig_love_box2d_PolygonShape_methods[] = {
    {0,0}
};
static swig_lua_attribute swig_love_box2d_PolygonShape_attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_love_box2d_PolygonShape_bases[] = {0,0};
static const char *swig_love_box2d_PolygonShape_base_names[] = {"love_box2d::Shape *",0};
static swig_lua_class _wrap_class_love_box2d_PolygonShape = { "PolygonShape", &SWIGTYPE_p_love_box2d__PolygonShape,0, swig_delete_PolygonShape, swig_love_box2d_PolygonShape_methods, swig_love_box2d_PolygonShape_attributes, swig_love_box2d_PolygonShape_bases, swig_love_box2d_PolygonShape_base_names };

static int _wrap_SmartPolygonShape___deref__(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PolygonShape > *arg1 = (boost::shared_ptr< love_box2d::PolygonShape > *) 0 ;
  love_box2d::PolygonShape *result = 0 ;
  
  SWIG_check_num_args("operator ->",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("operator ->",1,"boost::shared_ptr< love_box2d::PolygonShape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,0))){
    SWIG_fail_ptr("SmartPolygonShape___deref__",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t);
  }
  
  result = (love_box2d::PolygonShape *)((boost::shared_ptr< love_box2d::PolygonShape > const *)arg1)->operator ->();
  SWIG_arg=0;
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_love_box2d__PolygonShape,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_delete_SmartPolygonShape(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PolygonShape > *arg1 = (boost::shared_ptr< love_box2d::PolygonShape > *) 0 ;
  
  SWIG_check_num_args("boost::shared_ptr<(love_box2d::PolygonShape)>::~shared_ptr<(love_box2d::PolygonShape)>",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("boost::shared_ptr<(love_box2d::PolygonShape)>::~shared_ptr<(love_box2d::PolygonShape)>",1,"boost::shared_ptr< love_box2d::PolygonShape > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("delete_SmartPolygonShape",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t);
  }
  
  delete arg1;
  
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPolygonShape_getType(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PolygonShape > *arg1 = (boost::shared_ptr< love_box2d::PolygonShape > *) 0 ;
  int result;
  
  SWIG_check_num_args("getType",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getType",1,"boost::shared_ptr< love_box2d::PolygonShape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,0))){
    SWIG_fail_ptr("SmartPolygonShape_getType",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t);
  }
  
  result = (int)(*arg1)->getType();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPolygonShape_setFriction(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PolygonShape > *arg1 = (boost::shared_ptr< love_box2d::PolygonShape > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setFriction",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setFriction",1,"boost::shared_ptr< love_box2d::PolygonShape > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setFriction",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,0))){
    SWIG_fail_ptr("SmartPolygonShape_setFriction",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setFriction(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPolygonShape_setRestitution(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PolygonShape > *arg1 = (boost::shared_ptr< love_box2d::PolygonShape > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setRestitution",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setRestitution",1,"boost::shared_ptr< love_box2d::PolygonShape > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setRestitution",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,0))){
    SWIG_fail_ptr("SmartPolygonShape_setRestitution",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setRestitution(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPolygonShape_setDensity(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PolygonShape > *arg1 = (boost::shared_ptr< love_box2d::PolygonShape > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setDensity",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setDensity",1,"boost::shared_ptr< love_box2d::PolygonShape > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setDensity",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,0))){
    SWIG_fail_ptr("SmartPolygonShape_setDensity",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setDensity(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPolygonShape_setSensor(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PolygonShape > *arg1 = (boost::shared_ptr< love_box2d::PolygonShape > *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("setSensor",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setSensor",1,"boost::shared_ptr< love_box2d::PolygonShape > *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("setSensor",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,0))){
    SWIG_fail_ptr("SmartPolygonShape_setSensor",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (*arg1)->setSensor(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPolygonShape_getFriction(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PolygonShape > *arg1 = (boost::shared_ptr< love_box2d::PolygonShape > *) 0 ;
  float result;
  
  SWIG_check_num_args("getFriction",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getFriction",1,"boost::shared_ptr< love_box2d::PolygonShape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,0))){
    SWIG_fail_ptr("SmartPolygonShape_getFriction",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t);
  }
  
  result = (float)(*arg1)->getFriction();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPolygonShape_getRestituion(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PolygonShape > *arg1 = (boost::shared_ptr< love_box2d::PolygonShape > *) 0 ;
  float result;
  
  SWIG_check_num_args("getRestituion",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getRestituion",1,"boost::shared_ptr< love_box2d::PolygonShape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,0))){
    SWIG_fail_ptr("SmartPolygonShape_getRestituion",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t);
  }
  
  result = (float)(*arg1)->getRestituion();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPolygonShape_getDensity(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PolygonShape > *arg1 = (boost::shared_ptr< love_box2d::PolygonShape > *) 0 ;
  float result;
  
  SWIG_check_num_args("getDensity",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getDensity",1,"boost::shared_ptr< love_box2d::PolygonShape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,0))){
    SWIG_fail_ptr("SmartPolygonShape_getDensity",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t);
  }
  
  result = (float)(*arg1)->getDensity();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPolygonShape_isSensor(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PolygonShape > *arg1 = (boost::shared_ptr< love_box2d::PolygonShape > *) 0 ;
  bool result;
  
  SWIG_check_num_args("isSensor",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("isSensor",1,"boost::shared_ptr< love_box2d::PolygonShape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,0))){
    SWIG_fail_ptr("SmartPolygonShape_isSensor",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t);
  }
  
  result = (bool)(*arg1)->isSensor();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPolygonShape_getBody(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PolygonShape > *arg1 = (boost::shared_ptr< love_box2d::PolygonShape > *) 0 ;
  boost::shared_ptr< love_box2d::Body > result;
  
  SWIG_check_num_args("getBody",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getBody",1,"boost::shared_ptr< love_box2d::PolygonShape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,0))){
    SWIG_fail_ptr("SmartPolygonShape_getBody",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t);
  }
  
  result = (*arg1)->getBody();
  SWIG_arg=0;
  {
    boost::shared_ptr< love_box2d::Body > * resultptr = new boost::shared_ptr< love_box2d::Body >((boost::shared_ptr< love_box2d::Body > &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPolygonShape_testPoint(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PolygonShape > *arg1 = (boost::shared_ptr< love_box2d::PolygonShape > *) 0 ;
  float arg2 ;
  float arg3 ;
  bool result;
  
  SWIG_check_num_args("testPoint",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("testPoint",1,"boost::shared_ptr< love_box2d::PolygonShape > const *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("testPoint",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("testPoint",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,0))){
    SWIG_fail_ptr("SmartPolygonShape_testPoint",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  result = (bool)(*arg1)->testPoint(arg2,arg3);
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPolygonShape_setCategoryBits(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PolygonShape > *arg1 = (boost::shared_ptr< love_box2d::PolygonShape > *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("setCategoryBits",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setCategoryBits",1,"boost::shared_ptr< love_box2d::PolygonShape > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setCategoryBits",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,0))){
    SWIG_fail_ptr("SmartPolygonShape_setCategoryBits",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  (*arg1)->setCategoryBits(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPolygonShape_getCategoryBits(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PolygonShape > *arg1 = (boost::shared_ptr< love_box2d::PolygonShape > *) 0 ;
  int result;
  
  SWIG_check_num_args("getCategoryBits",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getCategoryBits",1,"boost::shared_ptr< love_box2d::PolygonShape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,0))){
    SWIG_fail_ptr("SmartPolygonShape_getCategoryBits",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t);
  }
  
  result = (int)(*arg1)->getCategoryBits();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPolygonShape_setMaskBits(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PolygonShape > *arg1 = (boost::shared_ptr< love_box2d::PolygonShape > *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("setMaskBits",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setMaskBits",1,"boost::shared_ptr< love_box2d::PolygonShape > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setMaskBits",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,0))){
    SWIG_fail_ptr("SmartPolygonShape_setMaskBits",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  (*arg1)->setMaskBits(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPolygonShape_getMaskBits(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PolygonShape > *arg1 = (boost::shared_ptr< love_box2d::PolygonShape > *) 0 ;
  int result;
  
  SWIG_check_num_args("getMaskBits",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getMaskBits",1,"boost::shared_ptr< love_box2d::PolygonShape > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,0))){
    SWIG_fail_ptr("SmartPolygonShape_getMaskBits",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t);
  }
  
  result = (int)(*arg1)->getMaskBits();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_SmartPolygonShape(void *obj) {
boost::shared_ptr< love_box2d::PolygonShape > *arg1 = (boost::shared_ptr< love_box2d::PolygonShape > *) obj;
delete arg1;
}
static swig_lua_method swig_boost_shared_ptr_Sl_love_box2d_PolygonShape_Sg__methods[] = {
	{"getData", love_box2d::_wrap_method_PolygonShape_getData},
	{"setCategory", love_box2d::_wrap_method_PolygonShape_setCategory},
	{"getBoundingBox", love_box2d::_wrap_method_PolygonShape_getBoundingBox},
	{"getCategory", love_box2d::_wrap_method_PolygonShape_getCategory},
	{"getPoints", love_box2d::_wrap_method_PolygonShape_getPoints},
	{"testSegment", love_box2d::_wrap_method_PolygonShape_testSegment},
	{"setData", love_box2d::_wrap_method_PolygonShape_setData},
	{"getMask", love_box2d::_wrap_method_PolygonShape_getMask},
	{"setMask", love_box2d::_wrap_method_PolygonShape_setMask},
	{"destroy", love_box2d::_wrap_method_PolygonShape_destroy},
    {"__deref__", _wrap_SmartPolygonShape___deref__}, 
    {"getType", _wrap_SmartPolygonShape_getType}, 
    {"setFriction", _wrap_SmartPolygonShape_setFriction}, 
    {"setRestitution", _wrap_SmartPolygonShape_setRestitution}, 
    {"setDensity", _wrap_SmartPolygonShape_setDensity}, 
    {"setSensor", _wrap_SmartPolygonShape_setSensor}, 
    {"getFriction", _wrap_SmartPolygonShape_getFriction}, 
    {"getRestituion", _wrap_SmartPolygonShape_getRestituion}, 
    {"getDensity", _wrap_SmartPolygonShape_getDensity}, 
    {"isSensor", _wrap_SmartPolygonShape_isSensor}, 
    {"getBody", _wrap_SmartPolygonShape_getBody}, 
    {"testPoint", _wrap_SmartPolygonShape_testPoint}, 
    {"setCategoryBits", _wrap_SmartPolygonShape_setCategoryBits}, 
    {"getCategoryBits", _wrap_SmartPolygonShape_getCategoryBits}, 
    {"setMaskBits", _wrap_SmartPolygonShape_setMaskBits}, 
    {"getMaskBits", _wrap_SmartPolygonShape_getMaskBits}, 
    {0,0}
};
static swig_lua_attribute swig_boost_shared_ptr_Sl_love_box2d_PolygonShape_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_boost_shared_ptr_Sl_love_box2d_PolygonShape_Sg__bases[] = {0};
static const char *swig_boost_shared_ptr_Sl_love_box2d_PolygonShape_Sg__base_names[] = {0};
static swig_lua_class _wrap_class_boost_shared_ptr_Sl_love_box2d_PolygonShape_Sg_ = { "SmartPolygonShape", &SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,0, swig_delete_SmartPolygonShape, swig_boost_shared_ptr_Sl_love_box2d_PolygonShape_Sg__methods, swig_boost_shared_ptr_Sl_love_box2d_PolygonShape_Sg__attributes, swig_boost_shared_ptr_Sl_love_box2d_PolygonShape_Sg__bases, swig_boost_shared_ptr_Sl_love_box2d_PolygonShape_Sg__base_names };

static int _wrap_Contact_getSeparation(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Contact *arg1 = (love_box2d::Contact *) 0 ;
  float result;
  
  SWIG_check_num_args("getSeparation",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getSeparation",1,"love_box2d::Contact const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Contact,0))){
    SWIG_fail_ptr("Contact_getSeparation",1,SWIGTYPE_p_love_box2d__Contact);
  }
  
  result = (float)((love_box2d::Contact const *)arg1)->getSeparation();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Contact_getFriction(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Contact *arg1 = (love_box2d::Contact *) 0 ;
  float result;
  
  SWIG_check_num_args("getFriction",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getFriction",1,"love_box2d::Contact const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Contact,0))){
    SWIG_fail_ptr("Contact_getFriction",1,SWIGTYPE_p_love_box2d__Contact);
  }
  
  result = (float)((love_box2d::Contact const *)arg1)->getFriction();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Contact_getRestitution(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Contact *arg1 = (love_box2d::Contact *) 0 ;
  float result;
  
  SWIG_check_num_args("getRestitution",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getRestitution",1,"love_box2d::Contact const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Contact,0))){
    SWIG_fail_ptr("Contact_getRestitution",1,SWIGTYPE_p_love_box2d__Contact);
  }
  
  result = (float)((love_box2d::Contact const *)arg1)->getRestitution();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_delete_Contact(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Contact *arg1 = (love_box2d::Contact *) 0 ;
  
  SWIG_check_num_args("love_box2d::Contact::~Contact",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("love_box2d::Contact::~Contact",1,"love_box2d::Contact *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Contact,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("delete_Contact",1,SWIGTYPE_p_love_box2d__Contact);
  }
  
  delete arg1;
  
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Contact(void *obj) {
love_box2d::Contact *arg1 = (love_box2d::Contact *) obj;
delete arg1;
}
static swig_lua_method swig_love_box2d_Contact_methods[] = {
    {"getSeparation", _wrap_Contact_getSeparation}, 
    {"getFriction", _wrap_Contact_getFriction}, 
    {"getRestitution", _wrap_Contact_getRestitution}, 
    {0,0}
};
static swig_lua_attribute swig_love_box2d_Contact_attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_love_box2d_Contact_bases[] = {0};
static const char *swig_love_box2d_Contact_base_names[] = {0};
static swig_lua_class _wrap_class_love_box2d_Contact = { "Contact", &SWIGTYPE_p_love_box2d__Contact,0, swig_delete_Contact, swig_love_box2d_Contact_methods, swig_love_box2d_Contact_attributes, swig_love_box2d_Contact_bases, swig_love_box2d_Contact_base_names };

static int _wrap_SmartContact___deref__(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Contact > *arg1 = (boost::shared_ptr< love_box2d::Contact > *) 0 ;
  love_box2d::Contact *result = 0 ;
  
  SWIG_check_num_args("operator ->",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("operator ->",1,"boost::shared_ptr< love_box2d::Contact > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Contact_t,0))){
    SWIG_fail_ptr("SmartContact___deref__",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Contact_t);
  }
  
  result = (love_box2d::Contact *)((boost::shared_ptr< love_box2d::Contact > const *)arg1)->operator ->();
  SWIG_arg=0;
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_love_box2d__Contact,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_delete_SmartContact(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Contact > *arg1 = (boost::shared_ptr< love_box2d::Contact > *) 0 ;
  
  SWIG_check_num_args("boost::shared_ptr<(love_box2d::Contact)>::~shared_ptr<(love_box2d::Contact)>",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("boost::shared_ptr<(love_box2d::Contact)>::~shared_ptr<(love_box2d::Contact)>",1,"boost::shared_ptr< love_box2d::Contact > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Contact_t,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("delete_SmartContact",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Contact_t);
  }
  
  delete arg1;
  
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartContact_getSeparation(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Contact > *arg1 = (boost::shared_ptr< love_box2d::Contact > *) 0 ;
  float result;
  
  SWIG_check_num_args("getSeparation",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getSeparation",1,"boost::shared_ptr< love_box2d::Contact > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Contact_t,0))){
    SWIG_fail_ptr("SmartContact_getSeparation",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Contact_t);
  }
  
  result = (float)(*arg1)->getSeparation();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartContact_getFriction(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Contact > *arg1 = (boost::shared_ptr< love_box2d::Contact > *) 0 ;
  float result;
  
  SWIG_check_num_args("getFriction",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getFriction",1,"boost::shared_ptr< love_box2d::Contact > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Contact_t,0))){
    SWIG_fail_ptr("SmartContact_getFriction",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Contact_t);
  }
  
  result = (float)(*arg1)->getFriction();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartContact_getRestitution(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Contact > *arg1 = (boost::shared_ptr< love_box2d::Contact > *) 0 ;
  float result;
  
  SWIG_check_num_args("getRestitution",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getRestitution",1,"boost::shared_ptr< love_box2d::Contact > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Contact_t,0))){
    SWIG_fail_ptr("SmartContact_getRestitution",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Contact_t);
  }
  
  result = (float)(*arg1)->getRestitution();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_SmartContact(void *obj) {
boost::shared_ptr< love_box2d::Contact > *arg1 = (boost::shared_ptr< love_box2d::Contact > *) obj;
delete arg1;
}
static swig_lua_method swig_boost_shared_ptr_Sl_love_box2d_Contact_Sg__methods[] = {
	{"getPosition", love_box2d::_wrap_method_Contact_getPosition},
	{"getVelocity", love_box2d::_wrap_method_Contact_getVelocity},
	{"getNormal", love_box2d::_wrap_method_Contact_getNormal},
    {"__deref__", _wrap_SmartContact___deref__}, 
    {"getSeparation", _wrap_SmartContact_getSeparation}, 
    {"getFriction", _wrap_SmartContact_getFriction}, 
    {"getRestitution", _wrap_SmartContact_getRestitution}, 
    {0,0}
};
static swig_lua_attribute swig_boost_shared_ptr_Sl_love_box2d_Contact_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_boost_shared_ptr_Sl_love_box2d_Contact_Sg__bases[] = {0};
static const char *swig_boost_shared_ptr_Sl_love_box2d_Contact_Sg__base_names[] = {0};
static swig_lua_class _wrap_class_boost_shared_ptr_Sl_love_box2d_Contact_Sg_ = { "SmartContact", &SWIGTYPE_p_boost__shared_ptrT_love_box2d__Contact_t,0, swig_delete_SmartContact, swig_boost_shared_ptr_Sl_love_box2d_Contact_Sg__methods, swig_boost_shared_ptr_Sl_love_box2d_Contact_Sg__attributes, swig_boost_shared_ptr_Sl_love_box2d_Contact_Sg__bases, swig_boost_shared_ptr_Sl_love_box2d_Contact_Sg__base_names };

static int _wrap_Joint_getType(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Joint *arg1 = (love_box2d::Joint *) 0 ;
  int result;
  
  SWIG_check_num_args("getType",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getType",1,"love_box2d::Joint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Joint,0))){
    SWIG_fail_ptr("Joint_getType",1,SWIGTYPE_p_love_box2d__Joint);
  }
  
  result = (int)((love_box2d::Joint const *)arg1)->getType();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Joint_getReactionTorque(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Joint *arg1 = (love_box2d::Joint *) 0 ;
  float result;
  
  SWIG_check_num_args("getReactionTorque",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getReactionTorque",1,"love_box2d::Joint *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Joint,0))){
    SWIG_fail_ptr("Joint_getReactionTorque",1,SWIGTYPE_p_love_box2d__Joint);
  }
  
  result = (float)(arg1)->getReactionTorque();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Joint_setCollideConnected(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Joint *arg1 = (love_box2d::Joint *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("setCollideConnected",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setCollideConnected",1,"love_box2d::Joint *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("setCollideConnected",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Joint,0))){
    SWIG_fail_ptr("Joint_setCollideConnected",1,SWIGTYPE_p_love_box2d__Joint);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (arg1)->setCollideConnected(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Joint_getCollideConnected(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Joint *arg1 = (love_box2d::Joint *) 0 ;
  bool result;
  
  SWIG_check_num_args("getCollideConnected",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getCollideConnected",1,"love_box2d::Joint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Joint,0))){
    SWIG_fail_ptr("Joint_getCollideConnected",1,SWIGTYPE_p_love_box2d__Joint);
  }
  
  result = (bool)((love_box2d::Joint const *)arg1)->getCollideConnected();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_delete_Joint(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::Joint *arg1 = (love_box2d::Joint *) 0 ;
  
  SWIG_check_num_args("love_box2d::Joint::~Joint",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("love_box2d::Joint::~Joint",1,"love_box2d::Joint *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__Joint,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("delete_Joint",1,SWIGTYPE_p_love_box2d__Joint);
  }
  
  delete arg1;
  
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Joint(void *obj) {
love_box2d::Joint *arg1 = (love_box2d::Joint *) obj;
delete arg1;
}
static swig_lua_method swig_love_box2d_Joint_methods[] = {
    {"getType", _wrap_Joint_getType}, 
    {"getReactionTorque", _wrap_Joint_getReactionTorque}, 
    {"setCollideConnected", _wrap_Joint_setCollideConnected}, 
    {"getCollideConnected", _wrap_Joint_getCollideConnected}, 
    {0,0}
};
static swig_lua_attribute swig_love_box2d_Joint_attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_love_box2d_Joint_bases[] = {0};
static const char *swig_love_box2d_Joint_base_names[] = {0};
static swig_lua_class _wrap_class_love_box2d_Joint = { "Joint", &SWIGTYPE_p_love_box2d__Joint,0, swig_delete_Joint, swig_love_box2d_Joint_methods, swig_love_box2d_Joint_attributes, swig_love_box2d_Joint_bases, swig_love_box2d_Joint_base_names };

static int _wrap_SmartJoint___deref__(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Joint > *arg1 = (boost::shared_ptr< love_box2d::Joint > *) 0 ;
  love_box2d::Joint *result = 0 ;
  
  SWIG_check_num_args("operator ->",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("operator ->",1,"boost::shared_ptr< love_box2d::Joint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Joint_t,0))){
    SWIG_fail_ptr("SmartJoint___deref__",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Joint_t);
  }
  
  result = (love_box2d::Joint *)((boost::shared_ptr< love_box2d::Joint > const *)arg1)->operator ->();
  SWIG_arg=0;
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_love_box2d__Joint,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_delete_SmartJoint(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Joint > *arg1 = (boost::shared_ptr< love_box2d::Joint > *) 0 ;
  
  SWIG_check_num_args("boost::shared_ptr<(love_box2d::Joint)>::~shared_ptr<(love_box2d::Joint)>",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("boost::shared_ptr<(love_box2d::Joint)>::~shared_ptr<(love_box2d::Joint)>",1,"boost::shared_ptr< love_box2d::Joint > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Joint_t,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("delete_SmartJoint",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Joint_t);
  }
  
  delete arg1;
  
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartJoint_getType(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Joint > *arg1 = (boost::shared_ptr< love_box2d::Joint > *) 0 ;
  int result;
  
  SWIG_check_num_args("getType",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getType",1,"boost::shared_ptr< love_box2d::Joint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Joint_t,0))){
    SWIG_fail_ptr("SmartJoint_getType",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Joint_t);
  }
  
  result = (int)(*arg1)->getType();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartJoint_getReactionTorque(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Joint > *arg1 = (boost::shared_ptr< love_box2d::Joint > *) 0 ;
  float result;
  
  SWIG_check_num_args("getReactionTorque",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getReactionTorque",1,"boost::shared_ptr< love_box2d::Joint > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Joint_t,0))){
    SWIG_fail_ptr("SmartJoint_getReactionTorque",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Joint_t);
  }
  
  result = (float)(*arg1)->getReactionTorque();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartJoint_setCollideConnected(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Joint > *arg1 = (boost::shared_ptr< love_box2d::Joint > *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("setCollideConnected",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setCollideConnected",1,"boost::shared_ptr< love_box2d::Joint > *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("setCollideConnected",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Joint_t,0))){
    SWIG_fail_ptr("SmartJoint_setCollideConnected",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Joint_t);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (*arg1)->setCollideConnected(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartJoint_getCollideConnected(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::Joint > *arg1 = (boost::shared_ptr< love_box2d::Joint > *) 0 ;
  bool result;
  
  SWIG_check_num_args("getCollideConnected",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getCollideConnected",1,"boost::shared_ptr< love_box2d::Joint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Joint_t,0))){
    SWIG_fail_ptr("SmartJoint_getCollideConnected",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Joint_t);
  }
  
  result = (bool)(*arg1)->getCollideConnected();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_SmartJoint(void *obj) {
boost::shared_ptr< love_box2d::Joint > *arg1 = (boost::shared_ptr< love_box2d::Joint > *) obj;
delete arg1;
}
static swig_lua_method swig_boost_shared_ptr_Sl_love_box2d_Joint_Sg__methods[] = {
    {"__deref__", _wrap_SmartJoint___deref__}, 
    {"getType", _wrap_SmartJoint_getType}, 
    {"getReactionTorque", _wrap_SmartJoint_getReactionTorque}, 
    {"setCollideConnected", _wrap_SmartJoint_setCollideConnected}, 
    {"getCollideConnected", _wrap_SmartJoint_getCollideConnected}, 
    {0,0}
};
static swig_lua_attribute swig_boost_shared_ptr_Sl_love_box2d_Joint_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_boost_shared_ptr_Sl_love_box2d_Joint_Sg__bases[] = {0};
static const char *swig_boost_shared_ptr_Sl_love_box2d_Joint_Sg__base_names[] = {0};
static swig_lua_class _wrap_class_boost_shared_ptr_Sl_love_box2d_Joint_Sg_ = { "SmartJoint", &SWIGTYPE_p_boost__shared_ptrT_love_box2d__Joint_t,0, swig_delete_SmartJoint, swig_boost_shared_ptr_Sl_love_box2d_Joint_Sg__methods, swig_boost_shared_ptr_Sl_love_box2d_Joint_Sg__attributes, swig_boost_shared_ptr_Sl_love_box2d_Joint_Sg__bases, swig_boost_shared_ptr_Sl_love_box2d_Joint_Sg__base_names };

static int _wrap_DistanceJoint_setLength(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::DistanceJoint *arg1 = (love_box2d::DistanceJoint *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setLength",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setLength",1,"love_box2d::DistanceJoint *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setLength",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__DistanceJoint,0))){
    SWIG_fail_ptr("DistanceJoint_setLength",1,SWIGTYPE_p_love_box2d__DistanceJoint);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->setLength(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_DistanceJoint_getLength(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::DistanceJoint *arg1 = (love_box2d::DistanceJoint *) 0 ;
  float result;
  
  SWIG_check_num_args("getLength",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getLength",1,"love_box2d::DistanceJoint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__DistanceJoint,0))){
    SWIG_fail_ptr("DistanceJoint_getLength",1,SWIGTYPE_p_love_box2d__DistanceJoint);
  }
  
  result = (float)((love_box2d::DistanceJoint const *)arg1)->getLength();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_DistanceJoint_setFrequency(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::DistanceJoint *arg1 = (love_box2d::DistanceJoint *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setFrequency",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setFrequency",1,"love_box2d::DistanceJoint *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setFrequency",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__DistanceJoint,0))){
    SWIG_fail_ptr("DistanceJoint_setFrequency",1,SWIGTYPE_p_love_box2d__DistanceJoint);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->setFrequency(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_DistanceJoint_getFrequency(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::DistanceJoint *arg1 = (love_box2d::DistanceJoint *) 0 ;
  float result;
  
  SWIG_check_num_args("getFrequency",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getFrequency",1,"love_box2d::DistanceJoint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__DistanceJoint,0))){
    SWIG_fail_ptr("DistanceJoint_getFrequency",1,SWIGTYPE_p_love_box2d__DistanceJoint);
  }
  
  result = (float)((love_box2d::DistanceJoint const *)arg1)->getFrequency();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_DistanceJoint_setDamping(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::DistanceJoint *arg1 = (love_box2d::DistanceJoint *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setDamping",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setDamping",1,"love_box2d::DistanceJoint *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setDamping",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__DistanceJoint,0))){
    SWIG_fail_ptr("DistanceJoint_setDamping",1,SWIGTYPE_p_love_box2d__DistanceJoint);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->setDamping(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_DistanceJoint_getDamping(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::DistanceJoint *arg1 = (love_box2d::DistanceJoint *) 0 ;
  float result;
  
  SWIG_check_num_args("getDamping",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getDamping",1,"love_box2d::DistanceJoint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__DistanceJoint,0))){
    SWIG_fail_ptr("DistanceJoint_getDamping",1,SWIGTYPE_p_love_box2d__DistanceJoint);
  }
  
  result = (float)((love_box2d::DistanceJoint const *)arg1)->getDamping();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_delete_DistanceJoint(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::DistanceJoint *arg1 = (love_box2d::DistanceJoint *) 0 ;
  
  SWIG_check_num_args("love_box2d::DistanceJoint::~DistanceJoint",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("love_box2d::DistanceJoint::~DistanceJoint",1,"love_box2d::DistanceJoint *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__DistanceJoint,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("delete_DistanceJoint",1,SWIGTYPE_p_love_box2d__DistanceJoint);
  }
  
  delete arg1;
  
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_DistanceJoint(void *obj) {
love_box2d::DistanceJoint *arg1 = (love_box2d::DistanceJoint *) obj;
delete arg1;
}
static swig_lua_method swig_love_box2d_DistanceJoint_methods[] = {
    {"setLength", _wrap_DistanceJoint_setLength}, 
    {"getLength", _wrap_DistanceJoint_getLength}, 
    {"setFrequency", _wrap_DistanceJoint_setFrequency}, 
    {"getFrequency", _wrap_DistanceJoint_getFrequency}, 
    {"setDamping", _wrap_DistanceJoint_setDamping}, 
    {"getDamping", _wrap_DistanceJoint_getDamping}, 
    {0,0}
};
static swig_lua_attribute swig_love_box2d_DistanceJoint_attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_love_box2d_DistanceJoint_bases[] = {0};
static const char *swig_love_box2d_DistanceJoint_base_names[] = {0};
static swig_lua_class _wrap_class_love_box2d_DistanceJoint = { "DistanceJoint", &SWIGTYPE_p_love_box2d__DistanceJoint,0, swig_delete_DistanceJoint, swig_love_box2d_DistanceJoint_methods, swig_love_box2d_DistanceJoint_attributes, swig_love_box2d_DistanceJoint_bases, swig_love_box2d_DistanceJoint_base_names };

static int _wrap_SmartDistanceJoint___deref__(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::DistanceJoint > *arg1 = (boost::shared_ptr< love_box2d::DistanceJoint > *) 0 ;
  love_box2d::DistanceJoint *result = 0 ;
  
  SWIG_check_num_args("operator ->",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("operator ->",1,"boost::shared_ptr< love_box2d::DistanceJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t,0))){
    SWIG_fail_ptr("SmartDistanceJoint___deref__",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t);
  }
  
  result = (love_box2d::DistanceJoint *)((boost::shared_ptr< love_box2d::DistanceJoint > const *)arg1)->operator ->();
  SWIG_arg=0;
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_love_box2d__DistanceJoint,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_delete_SmartDistanceJoint(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::DistanceJoint > *arg1 = (boost::shared_ptr< love_box2d::DistanceJoint > *) 0 ;
  
  SWIG_check_num_args("boost::shared_ptr<(love_box2d::DistanceJoint)>::~shared_ptr<(love_box2d::DistanceJoint)>",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("boost::shared_ptr<(love_box2d::DistanceJoint)>::~shared_ptr<(love_box2d::DistanceJoint)>",1,"boost::shared_ptr< love_box2d::DistanceJoint > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("delete_SmartDistanceJoint",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t);
  }
  
  delete arg1;
  
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartDistanceJoint_setLength(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::DistanceJoint > *arg1 = (boost::shared_ptr< love_box2d::DistanceJoint > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setLength",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setLength",1,"boost::shared_ptr< love_box2d::DistanceJoint > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setLength",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t,0))){
    SWIG_fail_ptr("SmartDistanceJoint_setLength",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setLength(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartDistanceJoint_getLength(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::DistanceJoint > *arg1 = (boost::shared_ptr< love_box2d::DistanceJoint > *) 0 ;
  float result;
  
  SWIG_check_num_args("getLength",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getLength",1,"boost::shared_ptr< love_box2d::DistanceJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t,0))){
    SWIG_fail_ptr("SmartDistanceJoint_getLength",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t);
  }
  
  result = (float)(*arg1)->getLength();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartDistanceJoint_setFrequency(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::DistanceJoint > *arg1 = (boost::shared_ptr< love_box2d::DistanceJoint > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setFrequency",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setFrequency",1,"boost::shared_ptr< love_box2d::DistanceJoint > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setFrequency",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t,0))){
    SWIG_fail_ptr("SmartDistanceJoint_setFrequency",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setFrequency(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartDistanceJoint_getFrequency(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::DistanceJoint > *arg1 = (boost::shared_ptr< love_box2d::DistanceJoint > *) 0 ;
  float result;
  
  SWIG_check_num_args("getFrequency",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getFrequency",1,"boost::shared_ptr< love_box2d::DistanceJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t,0))){
    SWIG_fail_ptr("SmartDistanceJoint_getFrequency",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t);
  }
  
  result = (float)(*arg1)->getFrequency();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartDistanceJoint_setDamping(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::DistanceJoint > *arg1 = (boost::shared_ptr< love_box2d::DistanceJoint > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setDamping",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setDamping",1,"boost::shared_ptr< love_box2d::DistanceJoint > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setDamping",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t,0))){
    SWIG_fail_ptr("SmartDistanceJoint_setDamping",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setDamping(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartDistanceJoint_getDamping(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::DistanceJoint > *arg1 = (boost::shared_ptr< love_box2d::DistanceJoint > *) 0 ;
  float result;
  
  SWIG_check_num_args("getDamping",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getDamping",1,"boost::shared_ptr< love_box2d::DistanceJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t,0))){
    SWIG_fail_ptr("SmartDistanceJoint_getDamping",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t);
  }
  
  result = (float)(*arg1)->getDamping();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_SmartDistanceJoint(void *obj) {
boost::shared_ptr< love_box2d::DistanceJoint > *arg1 = (boost::shared_ptr< love_box2d::DistanceJoint > *) obj;
delete arg1;
}
static swig_lua_method swig_boost_shared_ptr_Sl_love_box2d_DistanceJoint_Sg__methods[] = {
	{"getReactionForce", love_box2d::_wrap_method_DistanceJoint_getReactionForce},
	{"getAnchors", love_box2d::_wrap_method_DistanceJoint_getAnchors},
	{"destroy", love_box2d::_wrap_method_DistanceJoint_destroy},
    {"__deref__", _wrap_SmartDistanceJoint___deref__}, 
    {"setLength", _wrap_SmartDistanceJoint_setLength}, 
    {"getLength", _wrap_SmartDistanceJoint_getLength}, 
    {"setFrequency", _wrap_SmartDistanceJoint_setFrequency}, 
    {"getFrequency", _wrap_SmartDistanceJoint_getFrequency}, 
    {"setDamping", _wrap_SmartDistanceJoint_setDamping}, 
    {"getDamping", _wrap_SmartDistanceJoint_getDamping}, 
    {0,0}
};
static swig_lua_attribute swig_boost_shared_ptr_Sl_love_box2d_DistanceJoint_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_boost_shared_ptr_Sl_love_box2d_DistanceJoint_Sg__bases[] = {0};
static const char *swig_boost_shared_ptr_Sl_love_box2d_DistanceJoint_Sg__base_names[] = {0};
static swig_lua_class _wrap_class_boost_shared_ptr_Sl_love_box2d_DistanceJoint_Sg_ = { "SmartDistanceJoint", &SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t,0, swig_delete_SmartDistanceJoint, swig_boost_shared_ptr_Sl_love_box2d_DistanceJoint_Sg__methods, swig_boost_shared_ptr_Sl_love_box2d_DistanceJoint_Sg__attributes, swig_boost_shared_ptr_Sl_love_box2d_DistanceJoint_Sg__bases, swig_boost_shared_ptr_Sl_love_box2d_DistanceJoint_Sg__base_names };

static int _wrap_MouseJoint_setTarget(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::MouseJoint *arg1 = (love_box2d::MouseJoint *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("setTarget",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setTarget",1,"love_box2d::MouseJoint *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setTarget",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("setTarget",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__MouseJoint,0))){
    SWIG_fail_ptr("MouseJoint_setTarget",1,SWIGTYPE_p_love_box2d__MouseJoint);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->setTarget(arg2,arg3);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MouseJoint_setMaxForce(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::MouseJoint *arg1 = (love_box2d::MouseJoint *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setMaxForce",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setMaxForce",1,"love_box2d::MouseJoint *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setMaxForce",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__MouseJoint,0))){
    SWIG_fail_ptr("MouseJoint_setMaxForce",1,SWIGTYPE_p_love_box2d__MouseJoint);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->setMaxForce(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MouseJoint_getMaxForce(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::MouseJoint *arg1 = (love_box2d::MouseJoint *) 0 ;
  float result;
  
  SWIG_check_num_args("getMaxForce",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getMaxForce",1,"love_box2d::MouseJoint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__MouseJoint,0))){
    SWIG_fail_ptr("MouseJoint_getMaxForce",1,SWIGTYPE_p_love_box2d__MouseJoint);
  }
  
  result = (float)((love_box2d::MouseJoint const *)arg1)->getMaxForce();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_delete_MouseJoint(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::MouseJoint *arg1 = (love_box2d::MouseJoint *) 0 ;
  
  SWIG_check_num_args("love_box2d::MouseJoint::~MouseJoint",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("love_box2d::MouseJoint::~MouseJoint",1,"love_box2d::MouseJoint *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__MouseJoint,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("delete_MouseJoint",1,SWIGTYPE_p_love_box2d__MouseJoint);
  }
  
  delete arg1;
  
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_MouseJoint(void *obj) {
love_box2d::MouseJoint *arg1 = (love_box2d::MouseJoint *) obj;
delete arg1;
}
static swig_lua_method swig_love_box2d_MouseJoint_methods[] = {
    {"setTarget", _wrap_MouseJoint_setTarget}, 
    {"setMaxForce", _wrap_MouseJoint_setMaxForce}, 
    {"getMaxForce", _wrap_MouseJoint_getMaxForce}, 
    {0,0}
};
static swig_lua_attribute swig_love_box2d_MouseJoint_attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_love_box2d_MouseJoint_bases[] = {0};
static const char *swig_love_box2d_MouseJoint_base_names[] = {0};
static swig_lua_class _wrap_class_love_box2d_MouseJoint = { "MouseJoint", &SWIGTYPE_p_love_box2d__MouseJoint,0, swig_delete_MouseJoint, swig_love_box2d_MouseJoint_methods, swig_love_box2d_MouseJoint_attributes, swig_love_box2d_MouseJoint_bases, swig_love_box2d_MouseJoint_base_names };

static int _wrap_SmartMouseJoint___deref__(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::MouseJoint > *arg1 = (boost::shared_ptr< love_box2d::MouseJoint > *) 0 ;
  love_box2d::MouseJoint *result = 0 ;
  
  SWIG_check_num_args("operator ->",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("operator ->",1,"boost::shared_ptr< love_box2d::MouseJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__MouseJoint_t,0))){
    SWIG_fail_ptr("SmartMouseJoint___deref__",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__MouseJoint_t);
  }
  
  result = (love_box2d::MouseJoint *)((boost::shared_ptr< love_box2d::MouseJoint > const *)arg1)->operator ->();
  SWIG_arg=0;
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_love_box2d__MouseJoint,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_delete_SmartMouseJoint(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::MouseJoint > *arg1 = (boost::shared_ptr< love_box2d::MouseJoint > *) 0 ;
  
  SWIG_check_num_args("boost::shared_ptr<(love_box2d::MouseJoint)>::~shared_ptr<(love_box2d::MouseJoint)>",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("boost::shared_ptr<(love_box2d::MouseJoint)>::~shared_ptr<(love_box2d::MouseJoint)>",1,"boost::shared_ptr< love_box2d::MouseJoint > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__MouseJoint_t,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("delete_SmartMouseJoint",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__MouseJoint_t);
  }
  
  delete arg1;
  
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartMouseJoint_setTarget(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::MouseJoint > *arg1 = (boost::shared_ptr< love_box2d::MouseJoint > *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("setTarget",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setTarget",1,"boost::shared_ptr< love_box2d::MouseJoint > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setTarget",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("setTarget",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__MouseJoint_t,0))){
    SWIG_fail_ptr("SmartMouseJoint_setTarget",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__MouseJoint_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (*arg1)->setTarget(arg2,arg3);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartMouseJoint_setMaxForce(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::MouseJoint > *arg1 = (boost::shared_ptr< love_box2d::MouseJoint > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setMaxForce",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setMaxForce",1,"boost::shared_ptr< love_box2d::MouseJoint > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setMaxForce",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__MouseJoint_t,0))){
    SWIG_fail_ptr("SmartMouseJoint_setMaxForce",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__MouseJoint_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setMaxForce(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartMouseJoint_getMaxForce(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::MouseJoint > *arg1 = (boost::shared_ptr< love_box2d::MouseJoint > *) 0 ;
  float result;
  
  SWIG_check_num_args("getMaxForce",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getMaxForce",1,"boost::shared_ptr< love_box2d::MouseJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__MouseJoint_t,0))){
    SWIG_fail_ptr("SmartMouseJoint_getMaxForce",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__MouseJoint_t);
  }
  
  result = (float)(*arg1)->getMaxForce();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_SmartMouseJoint(void *obj) {
boost::shared_ptr< love_box2d::MouseJoint > *arg1 = (boost::shared_ptr< love_box2d::MouseJoint > *) obj;
delete arg1;
}
static swig_lua_method swig_boost_shared_ptr_Sl_love_box2d_MouseJoint_Sg__methods[] = {
	{"getReactionForce", love_box2d::_wrap_method_MouseJoint_getReactionForce},
	{"getTarget", love_box2d::_wrap_method_MouseJoint_getTarget},
	{"getAnchors", love_box2d::_wrap_method_MouseJoint_getAnchors},
	{"destroy", love_box2d::_wrap_method_MouseJoint_destroy},
    {"__deref__", _wrap_SmartMouseJoint___deref__}, 
    {"setTarget", _wrap_SmartMouseJoint_setTarget}, 
    {"setMaxForce", _wrap_SmartMouseJoint_setMaxForce}, 
    {"getMaxForce", _wrap_SmartMouseJoint_getMaxForce}, 
    {0,0}
};
static swig_lua_attribute swig_boost_shared_ptr_Sl_love_box2d_MouseJoint_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_boost_shared_ptr_Sl_love_box2d_MouseJoint_Sg__bases[] = {0};
static const char *swig_boost_shared_ptr_Sl_love_box2d_MouseJoint_Sg__base_names[] = {0};
static swig_lua_class _wrap_class_boost_shared_ptr_Sl_love_box2d_MouseJoint_Sg_ = { "SmartMouseJoint", &SWIGTYPE_p_boost__shared_ptrT_love_box2d__MouseJoint_t,0, swig_delete_SmartMouseJoint, swig_boost_shared_ptr_Sl_love_box2d_MouseJoint_Sg__methods, swig_boost_shared_ptr_Sl_love_box2d_MouseJoint_Sg__attributes, swig_boost_shared_ptr_Sl_love_box2d_MouseJoint_Sg__bases, swig_boost_shared_ptr_Sl_love_box2d_MouseJoint_Sg__base_names };

static int _wrap_RevoluteJoint_getAngle(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::RevoluteJoint *arg1 = (love_box2d::RevoluteJoint *) 0 ;
  float result;
  
  SWIG_check_num_args("getAngle",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getAngle",1,"love_box2d::RevoluteJoint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__RevoluteJoint,0))){
    SWIG_fail_ptr("RevoluteJoint_getAngle",1,SWIGTYPE_p_love_box2d__RevoluteJoint);
  }
  
  result = (float)((love_box2d::RevoluteJoint const *)arg1)->getAngle();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_RevoluteJoint_getSpeed(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::RevoluteJoint *arg1 = (love_box2d::RevoluteJoint *) 0 ;
  float result;
  
  SWIG_check_num_args("getSpeed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getSpeed",1,"love_box2d::RevoluteJoint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__RevoluteJoint,0))){
    SWIG_fail_ptr("RevoluteJoint_getSpeed",1,SWIGTYPE_p_love_box2d__RevoluteJoint);
  }
  
  result = (float)((love_box2d::RevoluteJoint const *)arg1)->getSpeed();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_RevoluteJoint_setMotorEnabled(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::RevoluteJoint *arg1 = (love_box2d::RevoluteJoint *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("setMotorEnabled",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setMotorEnabled",1,"love_box2d::RevoluteJoint *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("setMotorEnabled",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__RevoluteJoint,0))){
    SWIG_fail_ptr("RevoluteJoint_setMotorEnabled",1,SWIGTYPE_p_love_box2d__RevoluteJoint);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (arg1)->setMotorEnabled(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_RevoluteJoint_isMotorEnabled(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::RevoluteJoint *arg1 = (love_box2d::RevoluteJoint *) 0 ;
  bool result;
  
  SWIG_check_num_args("isMotorEnabled",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("isMotorEnabled",1,"love_box2d::RevoluteJoint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__RevoluteJoint,0))){
    SWIG_fail_ptr("RevoluteJoint_isMotorEnabled",1,SWIGTYPE_p_love_box2d__RevoluteJoint);
  }
  
  result = (bool)((love_box2d::RevoluteJoint const *)arg1)->isMotorEnabled();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_RevoluteJoint_setMaxMotorTorque(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::RevoluteJoint *arg1 = (love_box2d::RevoluteJoint *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setMaxMotorTorque",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setMaxMotorTorque",1,"love_box2d::RevoluteJoint *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setMaxMotorTorque",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__RevoluteJoint,0))){
    SWIG_fail_ptr("RevoluteJoint_setMaxMotorTorque",1,SWIGTYPE_p_love_box2d__RevoluteJoint);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->setMaxMotorTorque(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_RevoluteJoint_getMaxMotorTorque(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::RevoluteJoint *arg1 = (love_box2d::RevoluteJoint *) 0 ;
  float result;
  
  SWIG_check_num_args("getMaxMotorTorque",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getMaxMotorTorque",1,"love_box2d::RevoluteJoint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__RevoluteJoint,0))){
    SWIG_fail_ptr("RevoluteJoint_getMaxMotorTorque",1,SWIGTYPE_p_love_box2d__RevoluteJoint);
  }
  
  result = (float)((love_box2d::RevoluteJoint const *)arg1)->getMaxMotorTorque();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_RevoluteJoint_setMotorSpeed(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::RevoluteJoint *arg1 = (love_box2d::RevoluteJoint *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setMotorSpeed",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setMotorSpeed",1,"love_box2d::RevoluteJoint *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setMotorSpeed",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__RevoluteJoint,0))){
    SWIG_fail_ptr("RevoluteJoint_setMotorSpeed",1,SWIGTYPE_p_love_box2d__RevoluteJoint);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->setMotorSpeed(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_RevoluteJoint_getMotorSpeed(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::RevoluteJoint *arg1 = (love_box2d::RevoluteJoint *) 0 ;
  float result;
  
  SWIG_check_num_args("getMotorSpeed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getMotorSpeed",1,"love_box2d::RevoluteJoint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__RevoluteJoint,0))){
    SWIG_fail_ptr("RevoluteJoint_getMotorSpeed",1,SWIGTYPE_p_love_box2d__RevoluteJoint);
  }
  
  result = (float)((love_box2d::RevoluteJoint const *)arg1)->getMotorSpeed();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_RevoluteJoint_getMotorTorque(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::RevoluteJoint *arg1 = (love_box2d::RevoluteJoint *) 0 ;
  float result;
  
  SWIG_check_num_args("getMotorTorque",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getMotorTorque",1,"love_box2d::RevoluteJoint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__RevoluteJoint,0))){
    SWIG_fail_ptr("RevoluteJoint_getMotorTorque",1,SWIGTYPE_p_love_box2d__RevoluteJoint);
  }
  
  result = (float)((love_box2d::RevoluteJoint const *)arg1)->getMotorTorque();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_RevoluteJoint_setLimitsEnabled(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::RevoluteJoint *arg1 = (love_box2d::RevoluteJoint *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("setLimitsEnabled",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setLimitsEnabled",1,"love_box2d::RevoluteJoint *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("setLimitsEnabled",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__RevoluteJoint,0))){
    SWIG_fail_ptr("RevoluteJoint_setLimitsEnabled",1,SWIGTYPE_p_love_box2d__RevoluteJoint);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (arg1)->setLimitsEnabled(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_RevoluteJoint_isLimitsEnabled(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::RevoluteJoint *arg1 = (love_box2d::RevoluteJoint *) 0 ;
  bool result;
  
  SWIG_check_num_args("isLimitsEnabled",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("isLimitsEnabled",1,"love_box2d::RevoluteJoint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__RevoluteJoint,0))){
    SWIG_fail_ptr("RevoluteJoint_isLimitsEnabled",1,SWIGTYPE_p_love_box2d__RevoluteJoint);
  }
  
  result = (bool)((love_box2d::RevoluteJoint const *)arg1)->isLimitsEnabled();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_RevoluteJoint_setUpperLimit(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::RevoluteJoint *arg1 = (love_box2d::RevoluteJoint *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setUpperLimit",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setUpperLimit",1,"love_box2d::RevoluteJoint *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setUpperLimit",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__RevoluteJoint,0))){
    SWIG_fail_ptr("RevoluteJoint_setUpperLimit",1,SWIGTYPE_p_love_box2d__RevoluteJoint);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->setUpperLimit(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_RevoluteJoint_setLowerLimit(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::RevoluteJoint *arg1 = (love_box2d::RevoluteJoint *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setLowerLimit",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setLowerLimit",1,"love_box2d::RevoluteJoint *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setLowerLimit",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__RevoluteJoint,0))){
    SWIG_fail_ptr("RevoluteJoint_setLowerLimit",1,SWIGTYPE_p_love_box2d__RevoluteJoint);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->setLowerLimit(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_RevoluteJoint_setLimits(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::RevoluteJoint *arg1 = (love_box2d::RevoluteJoint *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("setLimits",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setLimits",1,"love_box2d::RevoluteJoint *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setLimits",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("setLimits",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__RevoluteJoint,0))){
    SWIG_fail_ptr("RevoluteJoint_setLimits",1,SWIGTYPE_p_love_box2d__RevoluteJoint);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->setLimits(arg2,arg3);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_RevoluteJoint_getLowerLimit(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::RevoluteJoint *arg1 = (love_box2d::RevoluteJoint *) 0 ;
  float result;
  
  SWIG_check_num_args("getLowerLimit",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getLowerLimit",1,"love_box2d::RevoluteJoint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__RevoluteJoint,0))){
    SWIG_fail_ptr("RevoluteJoint_getLowerLimit",1,SWIGTYPE_p_love_box2d__RevoluteJoint);
  }
  
  result = (float)((love_box2d::RevoluteJoint const *)arg1)->getLowerLimit();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_RevoluteJoint_getUpperLimit(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::RevoluteJoint *arg1 = (love_box2d::RevoluteJoint *) 0 ;
  float result;
  
  SWIG_check_num_args("getUpperLimit",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getUpperLimit",1,"love_box2d::RevoluteJoint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__RevoluteJoint,0))){
    SWIG_fail_ptr("RevoluteJoint_getUpperLimit",1,SWIGTYPE_p_love_box2d__RevoluteJoint);
  }
  
  result = (float)((love_box2d::RevoluteJoint const *)arg1)->getUpperLimit();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_delete_RevoluteJoint(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::RevoluteJoint *arg1 = (love_box2d::RevoluteJoint *) 0 ;
  
  SWIG_check_num_args("love_box2d::RevoluteJoint::~RevoluteJoint",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("love_box2d::RevoluteJoint::~RevoluteJoint",1,"love_box2d::RevoluteJoint *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__RevoluteJoint,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("delete_RevoluteJoint",1,SWIGTYPE_p_love_box2d__RevoluteJoint);
  }
  
  delete arg1;
  
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_RevoluteJoint(void *obj) {
love_box2d::RevoluteJoint *arg1 = (love_box2d::RevoluteJoint *) obj;
delete arg1;
}
static swig_lua_method swig_love_box2d_RevoluteJoint_methods[] = {
    {"getAngle", _wrap_RevoluteJoint_getAngle}, 
    {"getSpeed", _wrap_RevoluteJoint_getSpeed}, 
    {"setMotorEnabled", _wrap_RevoluteJoint_setMotorEnabled}, 
    {"isMotorEnabled", _wrap_RevoluteJoint_isMotorEnabled}, 
    {"setMaxMotorTorque", _wrap_RevoluteJoint_setMaxMotorTorque}, 
    {"getMaxMotorTorque", _wrap_RevoluteJoint_getMaxMotorTorque}, 
    {"setMotorSpeed", _wrap_RevoluteJoint_setMotorSpeed}, 
    {"getMotorSpeed", _wrap_RevoluteJoint_getMotorSpeed}, 
    {"getMotorTorque", _wrap_RevoluteJoint_getMotorTorque}, 
    {"setLimitsEnabled", _wrap_RevoluteJoint_setLimitsEnabled}, 
    {"isLimitsEnabled", _wrap_RevoluteJoint_isLimitsEnabled}, 
    {"setUpperLimit", _wrap_RevoluteJoint_setUpperLimit}, 
    {"setLowerLimit", _wrap_RevoluteJoint_setLowerLimit}, 
    {"setLimits", _wrap_RevoluteJoint_setLimits}, 
    {"getLowerLimit", _wrap_RevoluteJoint_getLowerLimit}, 
    {"getUpperLimit", _wrap_RevoluteJoint_getUpperLimit}, 
    {0,0}
};
static swig_lua_attribute swig_love_box2d_RevoluteJoint_attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_love_box2d_RevoluteJoint_bases[] = {0};
static const char *swig_love_box2d_RevoluteJoint_base_names[] = {0};
static swig_lua_class _wrap_class_love_box2d_RevoluteJoint = { "RevoluteJoint", &SWIGTYPE_p_love_box2d__RevoluteJoint,0, swig_delete_RevoluteJoint, swig_love_box2d_RevoluteJoint_methods, swig_love_box2d_RevoluteJoint_attributes, swig_love_box2d_RevoluteJoint_bases, swig_love_box2d_RevoluteJoint_base_names };

static int _wrap_SmartRevoluteJoint___deref__(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::RevoluteJoint > *arg1 = (boost::shared_ptr< love_box2d::RevoluteJoint > *) 0 ;
  love_box2d::RevoluteJoint *result = 0 ;
  
  SWIG_check_num_args("operator ->",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("operator ->",1,"boost::shared_ptr< love_box2d::RevoluteJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,0))){
    SWIG_fail_ptr("SmartRevoluteJoint___deref__",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t);
  }
  
  result = (love_box2d::RevoluteJoint *)((boost::shared_ptr< love_box2d::RevoluteJoint > const *)arg1)->operator ->();
  SWIG_arg=0;
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_love_box2d__RevoluteJoint,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_delete_SmartRevoluteJoint(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::RevoluteJoint > *arg1 = (boost::shared_ptr< love_box2d::RevoluteJoint > *) 0 ;
  
  SWIG_check_num_args("boost::shared_ptr<(love_box2d::RevoluteJoint)>::~shared_ptr<(love_box2d::RevoluteJoint)>",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("boost::shared_ptr<(love_box2d::RevoluteJoint)>::~shared_ptr<(love_box2d::RevoluteJoint)>",1,"boost::shared_ptr< love_box2d::RevoluteJoint > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("delete_SmartRevoluteJoint",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t);
  }
  
  delete arg1;
  
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartRevoluteJoint_getAngle(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::RevoluteJoint > *arg1 = (boost::shared_ptr< love_box2d::RevoluteJoint > *) 0 ;
  float result;
  
  SWIG_check_num_args("getAngle",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getAngle",1,"boost::shared_ptr< love_box2d::RevoluteJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,0))){
    SWIG_fail_ptr("SmartRevoluteJoint_getAngle",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t);
  }
  
  result = (float)(*arg1)->getAngle();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartRevoluteJoint_getSpeed(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::RevoluteJoint > *arg1 = (boost::shared_ptr< love_box2d::RevoluteJoint > *) 0 ;
  float result;
  
  SWIG_check_num_args("getSpeed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getSpeed",1,"boost::shared_ptr< love_box2d::RevoluteJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,0))){
    SWIG_fail_ptr("SmartRevoluteJoint_getSpeed",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t);
  }
  
  result = (float)(*arg1)->getSpeed();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartRevoluteJoint_setMotorEnabled(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::RevoluteJoint > *arg1 = (boost::shared_ptr< love_box2d::RevoluteJoint > *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("setMotorEnabled",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setMotorEnabled",1,"boost::shared_ptr< love_box2d::RevoluteJoint > *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("setMotorEnabled",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,0))){
    SWIG_fail_ptr("SmartRevoluteJoint_setMotorEnabled",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (*arg1)->setMotorEnabled(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartRevoluteJoint_isMotorEnabled(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::RevoluteJoint > *arg1 = (boost::shared_ptr< love_box2d::RevoluteJoint > *) 0 ;
  bool result;
  
  SWIG_check_num_args("isMotorEnabled",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("isMotorEnabled",1,"boost::shared_ptr< love_box2d::RevoluteJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,0))){
    SWIG_fail_ptr("SmartRevoluteJoint_isMotorEnabled",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t);
  }
  
  result = (bool)(*arg1)->isMotorEnabled();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartRevoluteJoint_setMaxMotorTorque(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::RevoluteJoint > *arg1 = (boost::shared_ptr< love_box2d::RevoluteJoint > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setMaxMotorTorque",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setMaxMotorTorque",1,"boost::shared_ptr< love_box2d::RevoluteJoint > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setMaxMotorTorque",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,0))){
    SWIG_fail_ptr("SmartRevoluteJoint_setMaxMotorTorque",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setMaxMotorTorque(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartRevoluteJoint_getMaxMotorTorque(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::RevoluteJoint > *arg1 = (boost::shared_ptr< love_box2d::RevoluteJoint > *) 0 ;
  float result;
  
  SWIG_check_num_args("getMaxMotorTorque",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getMaxMotorTorque",1,"boost::shared_ptr< love_box2d::RevoluteJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,0))){
    SWIG_fail_ptr("SmartRevoluteJoint_getMaxMotorTorque",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t);
  }
  
  result = (float)(*arg1)->getMaxMotorTorque();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartRevoluteJoint_setMotorSpeed(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::RevoluteJoint > *arg1 = (boost::shared_ptr< love_box2d::RevoluteJoint > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setMotorSpeed",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setMotorSpeed",1,"boost::shared_ptr< love_box2d::RevoluteJoint > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setMotorSpeed",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,0))){
    SWIG_fail_ptr("SmartRevoluteJoint_setMotorSpeed",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setMotorSpeed(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartRevoluteJoint_getMotorSpeed(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::RevoluteJoint > *arg1 = (boost::shared_ptr< love_box2d::RevoluteJoint > *) 0 ;
  float result;
  
  SWIG_check_num_args("getMotorSpeed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getMotorSpeed",1,"boost::shared_ptr< love_box2d::RevoluteJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,0))){
    SWIG_fail_ptr("SmartRevoluteJoint_getMotorSpeed",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t);
  }
  
  result = (float)(*arg1)->getMotorSpeed();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartRevoluteJoint_getMotorTorque(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::RevoluteJoint > *arg1 = (boost::shared_ptr< love_box2d::RevoluteJoint > *) 0 ;
  float result;
  
  SWIG_check_num_args("getMotorTorque",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getMotorTorque",1,"boost::shared_ptr< love_box2d::RevoluteJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,0))){
    SWIG_fail_ptr("SmartRevoluteJoint_getMotorTorque",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t);
  }
  
  result = (float)(*arg1)->getMotorTorque();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartRevoluteJoint_setLimitsEnabled(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::RevoluteJoint > *arg1 = (boost::shared_ptr< love_box2d::RevoluteJoint > *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("setLimitsEnabled",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setLimitsEnabled",1,"boost::shared_ptr< love_box2d::RevoluteJoint > *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("setLimitsEnabled",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,0))){
    SWIG_fail_ptr("SmartRevoluteJoint_setLimitsEnabled",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (*arg1)->setLimitsEnabled(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartRevoluteJoint_isLimitsEnabled(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::RevoluteJoint > *arg1 = (boost::shared_ptr< love_box2d::RevoluteJoint > *) 0 ;
  bool result;
  
  SWIG_check_num_args("isLimitsEnabled",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("isLimitsEnabled",1,"boost::shared_ptr< love_box2d::RevoluteJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,0))){
    SWIG_fail_ptr("SmartRevoluteJoint_isLimitsEnabled",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t);
  }
  
  result = (bool)(*arg1)->isLimitsEnabled();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartRevoluteJoint_setUpperLimit(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::RevoluteJoint > *arg1 = (boost::shared_ptr< love_box2d::RevoluteJoint > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setUpperLimit",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setUpperLimit",1,"boost::shared_ptr< love_box2d::RevoluteJoint > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setUpperLimit",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,0))){
    SWIG_fail_ptr("SmartRevoluteJoint_setUpperLimit",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setUpperLimit(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartRevoluteJoint_setLowerLimit(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::RevoluteJoint > *arg1 = (boost::shared_ptr< love_box2d::RevoluteJoint > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setLowerLimit",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setLowerLimit",1,"boost::shared_ptr< love_box2d::RevoluteJoint > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setLowerLimit",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,0))){
    SWIG_fail_ptr("SmartRevoluteJoint_setLowerLimit",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setLowerLimit(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartRevoluteJoint_setLimits(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::RevoluteJoint > *arg1 = (boost::shared_ptr< love_box2d::RevoluteJoint > *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("setLimits",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setLimits",1,"boost::shared_ptr< love_box2d::RevoluteJoint > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setLimits",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("setLimits",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,0))){
    SWIG_fail_ptr("SmartRevoluteJoint_setLimits",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (*arg1)->setLimits(arg2,arg3);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartRevoluteJoint_getLowerLimit(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::RevoluteJoint > *arg1 = (boost::shared_ptr< love_box2d::RevoluteJoint > *) 0 ;
  float result;
  
  SWIG_check_num_args("getLowerLimit",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getLowerLimit",1,"boost::shared_ptr< love_box2d::RevoluteJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,0))){
    SWIG_fail_ptr("SmartRevoluteJoint_getLowerLimit",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t);
  }
  
  result = (float)(*arg1)->getLowerLimit();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartRevoluteJoint_getUpperLimit(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::RevoluteJoint > *arg1 = (boost::shared_ptr< love_box2d::RevoluteJoint > *) 0 ;
  float result;
  
  SWIG_check_num_args("getUpperLimit",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getUpperLimit",1,"boost::shared_ptr< love_box2d::RevoluteJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,0))){
    SWIG_fail_ptr("SmartRevoluteJoint_getUpperLimit",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t);
  }
  
  result = (float)(*arg1)->getUpperLimit();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_SmartRevoluteJoint(void *obj) {
boost::shared_ptr< love_box2d::RevoluteJoint > *arg1 = (boost::shared_ptr< love_box2d::RevoluteJoint > *) obj;
delete arg1;
}
static swig_lua_method swig_boost_shared_ptr_Sl_love_box2d_RevoluteJoint_Sg__methods[] = {
	{"getLimits", love_box2d::_wrap_method_RevoluteJoint_getLimits},
	{"getReactionForce", love_box2d::_wrap_method_RevoluteJoint_getReactionForce},
	{"getAnchors", love_box2d::_wrap_method_RevoluteJoint_getAnchors},
	{"destroy", love_box2d::_wrap_method_RevoluteJoint_destroy},
    {"__deref__", _wrap_SmartRevoluteJoint___deref__}, 
    {"getAngle", _wrap_SmartRevoluteJoint_getAngle}, 
    {"getSpeed", _wrap_SmartRevoluteJoint_getSpeed}, 
    {"setMotorEnabled", _wrap_SmartRevoluteJoint_setMotorEnabled}, 
    {"isMotorEnabled", _wrap_SmartRevoluteJoint_isMotorEnabled}, 
    {"setMaxMotorTorque", _wrap_SmartRevoluteJoint_setMaxMotorTorque}, 
    {"getMaxMotorTorque", _wrap_SmartRevoluteJoint_getMaxMotorTorque}, 
    {"setMotorSpeed", _wrap_SmartRevoluteJoint_setMotorSpeed}, 
    {"getMotorSpeed", _wrap_SmartRevoluteJoint_getMotorSpeed}, 
    {"getMotorTorque", _wrap_SmartRevoluteJoint_getMotorTorque}, 
    {"setLimitsEnabled", _wrap_SmartRevoluteJoint_setLimitsEnabled}, 
    {"isLimitsEnabled", _wrap_SmartRevoluteJoint_isLimitsEnabled}, 
    {"setUpperLimit", _wrap_SmartRevoluteJoint_setUpperLimit}, 
    {"setLowerLimit", _wrap_SmartRevoluteJoint_setLowerLimit}, 
    {"setLimits", _wrap_SmartRevoluteJoint_setLimits}, 
    {"getLowerLimit", _wrap_SmartRevoluteJoint_getLowerLimit}, 
    {"getUpperLimit", _wrap_SmartRevoluteJoint_getUpperLimit}, 
    {0,0}
};
static swig_lua_attribute swig_boost_shared_ptr_Sl_love_box2d_RevoluteJoint_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_boost_shared_ptr_Sl_love_box2d_RevoluteJoint_Sg__bases[] = {0};
static const char *swig_boost_shared_ptr_Sl_love_box2d_RevoluteJoint_Sg__base_names[] = {0};
static swig_lua_class _wrap_class_boost_shared_ptr_Sl_love_box2d_RevoluteJoint_Sg_ = { "SmartRevoluteJoint", &SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,0, swig_delete_SmartRevoluteJoint, swig_boost_shared_ptr_Sl_love_box2d_RevoluteJoint_Sg__methods, swig_boost_shared_ptr_Sl_love_box2d_RevoluteJoint_Sg__attributes, swig_boost_shared_ptr_Sl_love_box2d_RevoluteJoint_Sg__bases, swig_boost_shared_ptr_Sl_love_box2d_RevoluteJoint_Sg__base_names };

static int _wrap_PrismaticJoint_getTranslation(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::PrismaticJoint *arg1 = (love_box2d::PrismaticJoint *) 0 ;
  float result;
  
  SWIG_check_num_args("getTranslation",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getTranslation",1,"love_box2d::PrismaticJoint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__PrismaticJoint,0))){
    SWIG_fail_ptr("PrismaticJoint_getTranslation",1,SWIGTYPE_p_love_box2d__PrismaticJoint);
  }
  
  result = (float)((love_box2d::PrismaticJoint const *)arg1)->getTranslation();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PrismaticJoint_getSpeed(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::PrismaticJoint *arg1 = (love_box2d::PrismaticJoint *) 0 ;
  float result;
  
  SWIG_check_num_args("getSpeed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getSpeed",1,"love_box2d::PrismaticJoint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__PrismaticJoint,0))){
    SWIG_fail_ptr("PrismaticJoint_getSpeed",1,SWIGTYPE_p_love_box2d__PrismaticJoint);
  }
  
  result = (float)((love_box2d::PrismaticJoint const *)arg1)->getSpeed();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PrismaticJoint_setMotorEnabled(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::PrismaticJoint *arg1 = (love_box2d::PrismaticJoint *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("setMotorEnabled",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setMotorEnabled",1,"love_box2d::PrismaticJoint *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("setMotorEnabled",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__PrismaticJoint,0))){
    SWIG_fail_ptr("PrismaticJoint_setMotorEnabled",1,SWIGTYPE_p_love_box2d__PrismaticJoint);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (arg1)->setMotorEnabled(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PrismaticJoint_isMotorEnabled(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::PrismaticJoint *arg1 = (love_box2d::PrismaticJoint *) 0 ;
  bool result;
  
  SWIG_check_num_args("isMotorEnabled",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("isMotorEnabled",1,"love_box2d::PrismaticJoint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__PrismaticJoint,0))){
    SWIG_fail_ptr("PrismaticJoint_isMotorEnabled",1,SWIGTYPE_p_love_box2d__PrismaticJoint);
  }
  
  result = (bool)((love_box2d::PrismaticJoint const *)arg1)->isMotorEnabled();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PrismaticJoint_setMaxMotorForce(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::PrismaticJoint *arg1 = (love_box2d::PrismaticJoint *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setMaxMotorForce",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setMaxMotorForce",1,"love_box2d::PrismaticJoint *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setMaxMotorForce",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__PrismaticJoint,0))){
    SWIG_fail_ptr("PrismaticJoint_setMaxMotorForce",1,SWIGTYPE_p_love_box2d__PrismaticJoint);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->setMaxMotorForce(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PrismaticJoint_getMaxMotorForce(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::PrismaticJoint *arg1 = (love_box2d::PrismaticJoint *) 0 ;
  float result;
  
  SWIG_check_num_args("getMaxMotorForce",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getMaxMotorForce",1,"love_box2d::PrismaticJoint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__PrismaticJoint,0))){
    SWIG_fail_ptr("PrismaticJoint_getMaxMotorForce",1,SWIGTYPE_p_love_box2d__PrismaticJoint);
  }
  
  result = (float)((love_box2d::PrismaticJoint const *)arg1)->getMaxMotorForce();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PrismaticJoint_setMotorSpeed(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::PrismaticJoint *arg1 = (love_box2d::PrismaticJoint *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setMotorSpeed",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setMotorSpeed",1,"love_box2d::PrismaticJoint *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setMotorSpeed",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__PrismaticJoint,0))){
    SWIG_fail_ptr("PrismaticJoint_setMotorSpeed",1,SWIGTYPE_p_love_box2d__PrismaticJoint);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->setMotorSpeed(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PrismaticJoint_getMotorSpeed(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::PrismaticJoint *arg1 = (love_box2d::PrismaticJoint *) 0 ;
  float result;
  
  SWIG_check_num_args("getMotorSpeed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getMotorSpeed",1,"love_box2d::PrismaticJoint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__PrismaticJoint,0))){
    SWIG_fail_ptr("PrismaticJoint_getMotorSpeed",1,SWIGTYPE_p_love_box2d__PrismaticJoint);
  }
  
  result = (float)((love_box2d::PrismaticJoint const *)arg1)->getMotorSpeed();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PrismaticJoint_getMotorForce(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::PrismaticJoint *arg1 = (love_box2d::PrismaticJoint *) 0 ;
  float result;
  
  SWIG_check_num_args("getMotorForce",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getMotorForce",1,"love_box2d::PrismaticJoint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__PrismaticJoint,0))){
    SWIG_fail_ptr("PrismaticJoint_getMotorForce",1,SWIGTYPE_p_love_box2d__PrismaticJoint);
  }
  
  result = (float)((love_box2d::PrismaticJoint const *)arg1)->getMotorForce();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PrismaticJoint_setLimitsEnabled(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::PrismaticJoint *arg1 = (love_box2d::PrismaticJoint *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("setLimitsEnabled",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setLimitsEnabled",1,"love_box2d::PrismaticJoint *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("setLimitsEnabled",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__PrismaticJoint,0))){
    SWIG_fail_ptr("PrismaticJoint_setLimitsEnabled",1,SWIGTYPE_p_love_box2d__PrismaticJoint);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (arg1)->setLimitsEnabled(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PrismaticJoint_isLimitsEnabled(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::PrismaticJoint *arg1 = (love_box2d::PrismaticJoint *) 0 ;
  bool result;
  
  SWIG_check_num_args("isLimitsEnabled",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("isLimitsEnabled",1,"love_box2d::PrismaticJoint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__PrismaticJoint,0))){
    SWIG_fail_ptr("PrismaticJoint_isLimitsEnabled",1,SWIGTYPE_p_love_box2d__PrismaticJoint);
  }
  
  result = (bool)((love_box2d::PrismaticJoint const *)arg1)->isLimitsEnabled();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PrismaticJoint_setUpperLimit(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::PrismaticJoint *arg1 = (love_box2d::PrismaticJoint *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setUpperLimit",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setUpperLimit",1,"love_box2d::PrismaticJoint *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setUpperLimit",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__PrismaticJoint,0))){
    SWIG_fail_ptr("PrismaticJoint_setUpperLimit",1,SWIGTYPE_p_love_box2d__PrismaticJoint);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->setUpperLimit(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PrismaticJoint_setLowerLimit(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::PrismaticJoint *arg1 = (love_box2d::PrismaticJoint *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setLowerLimit",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setLowerLimit",1,"love_box2d::PrismaticJoint *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setLowerLimit",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__PrismaticJoint,0))){
    SWIG_fail_ptr("PrismaticJoint_setLowerLimit",1,SWIGTYPE_p_love_box2d__PrismaticJoint);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->setLowerLimit(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PrismaticJoint_setLimits(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::PrismaticJoint *arg1 = (love_box2d::PrismaticJoint *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("setLimits",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setLimits",1,"love_box2d::PrismaticJoint *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setLimits",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("setLimits",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__PrismaticJoint,0))){
    SWIG_fail_ptr("PrismaticJoint_setLimits",1,SWIGTYPE_p_love_box2d__PrismaticJoint);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->setLimits(arg2,arg3);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PrismaticJoint_getLowerLimit(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::PrismaticJoint *arg1 = (love_box2d::PrismaticJoint *) 0 ;
  float result;
  
  SWIG_check_num_args("getLowerLimit",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getLowerLimit",1,"love_box2d::PrismaticJoint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__PrismaticJoint,0))){
    SWIG_fail_ptr("PrismaticJoint_getLowerLimit",1,SWIGTYPE_p_love_box2d__PrismaticJoint);
  }
  
  result = (float)((love_box2d::PrismaticJoint const *)arg1)->getLowerLimit();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PrismaticJoint_getUpperLimit(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::PrismaticJoint *arg1 = (love_box2d::PrismaticJoint *) 0 ;
  float result;
  
  SWIG_check_num_args("getUpperLimit",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getUpperLimit",1,"love_box2d::PrismaticJoint const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__PrismaticJoint,0))){
    SWIG_fail_ptr("PrismaticJoint_getUpperLimit",1,SWIGTYPE_p_love_box2d__PrismaticJoint);
  }
  
  result = (float)((love_box2d::PrismaticJoint const *)arg1)->getUpperLimit();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_delete_PrismaticJoint(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::PrismaticJoint *arg1 = (love_box2d::PrismaticJoint *) 0 ;
  
  SWIG_check_num_args("love_box2d::PrismaticJoint::~PrismaticJoint",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("love_box2d::PrismaticJoint::~PrismaticJoint",1,"love_box2d::PrismaticJoint *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_love_box2d__PrismaticJoint,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("delete_PrismaticJoint",1,SWIGTYPE_p_love_box2d__PrismaticJoint);
  }
  
  delete arg1;
  
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_PrismaticJoint(void *obj) {
love_box2d::PrismaticJoint *arg1 = (love_box2d::PrismaticJoint *) obj;
delete arg1;
}
static swig_lua_method swig_love_box2d_PrismaticJoint_methods[] = {
    {"getTranslation", _wrap_PrismaticJoint_getTranslation}, 
    {"getSpeed", _wrap_PrismaticJoint_getSpeed}, 
    {"setMotorEnabled", _wrap_PrismaticJoint_setMotorEnabled}, 
    {"isMotorEnabled", _wrap_PrismaticJoint_isMotorEnabled}, 
    {"setMaxMotorForce", _wrap_PrismaticJoint_setMaxMotorForce}, 
    {"getMaxMotorForce", _wrap_PrismaticJoint_getMaxMotorForce}, 
    {"setMotorSpeed", _wrap_PrismaticJoint_setMotorSpeed}, 
    {"getMotorSpeed", _wrap_PrismaticJoint_getMotorSpeed}, 
    {"getMotorForce", _wrap_PrismaticJoint_getMotorForce}, 
    {"setLimitsEnabled", _wrap_PrismaticJoint_setLimitsEnabled}, 
    {"isLimitsEnabled", _wrap_PrismaticJoint_isLimitsEnabled}, 
    {"setUpperLimit", _wrap_PrismaticJoint_setUpperLimit}, 
    {"setLowerLimit", _wrap_PrismaticJoint_setLowerLimit}, 
    {"setLimits", _wrap_PrismaticJoint_setLimits}, 
    {"getLowerLimit", _wrap_PrismaticJoint_getLowerLimit}, 
    {"getUpperLimit", _wrap_PrismaticJoint_getUpperLimit}, 
    {0,0}
};
static swig_lua_attribute swig_love_box2d_PrismaticJoint_attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_love_box2d_PrismaticJoint_bases[] = {0};
static const char *swig_love_box2d_PrismaticJoint_base_names[] = {0};
static swig_lua_class _wrap_class_love_box2d_PrismaticJoint = { "PrismaticJoint", &SWIGTYPE_p_love_box2d__PrismaticJoint,0, swig_delete_PrismaticJoint, swig_love_box2d_PrismaticJoint_methods, swig_love_box2d_PrismaticJoint_attributes, swig_love_box2d_PrismaticJoint_bases, swig_love_box2d_PrismaticJoint_base_names };

static int _wrap_SmartPrismaticJoint___deref__(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PrismaticJoint > *arg1 = (boost::shared_ptr< love_box2d::PrismaticJoint > *) 0 ;
  love_box2d::PrismaticJoint *result = 0 ;
  
  SWIG_check_num_args("operator ->",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("operator ->",1,"boost::shared_ptr< love_box2d::PrismaticJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,0))){
    SWIG_fail_ptr("SmartPrismaticJoint___deref__",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t);
  }
  
  result = (love_box2d::PrismaticJoint *)((boost::shared_ptr< love_box2d::PrismaticJoint > const *)arg1)->operator ->();
  SWIG_arg=0;
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_love_box2d__PrismaticJoint,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_delete_SmartPrismaticJoint(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PrismaticJoint > *arg1 = (boost::shared_ptr< love_box2d::PrismaticJoint > *) 0 ;
  
  SWIG_check_num_args("boost::shared_ptr<(love_box2d::PrismaticJoint)>::~shared_ptr<(love_box2d::PrismaticJoint)>",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("boost::shared_ptr<(love_box2d::PrismaticJoint)>::~shared_ptr<(love_box2d::PrismaticJoint)>",1,"boost::shared_ptr< love_box2d::PrismaticJoint > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("delete_SmartPrismaticJoint",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t);
  }
  
  delete arg1;
  
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPrismaticJoint_getTranslation(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PrismaticJoint > *arg1 = (boost::shared_ptr< love_box2d::PrismaticJoint > *) 0 ;
  float result;
  
  SWIG_check_num_args("getTranslation",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getTranslation",1,"boost::shared_ptr< love_box2d::PrismaticJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,0))){
    SWIG_fail_ptr("SmartPrismaticJoint_getTranslation",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t);
  }
  
  result = (float)(*arg1)->getTranslation();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPrismaticJoint_getSpeed(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PrismaticJoint > *arg1 = (boost::shared_ptr< love_box2d::PrismaticJoint > *) 0 ;
  float result;
  
  SWIG_check_num_args("getSpeed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getSpeed",1,"boost::shared_ptr< love_box2d::PrismaticJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,0))){
    SWIG_fail_ptr("SmartPrismaticJoint_getSpeed",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t);
  }
  
  result = (float)(*arg1)->getSpeed();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPrismaticJoint_setMotorEnabled(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PrismaticJoint > *arg1 = (boost::shared_ptr< love_box2d::PrismaticJoint > *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("setMotorEnabled",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setMotorEnabled",1,"boost::shared_ptr< love_box2d::PrismaticJoint > *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("setMotorEnabled",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,0))){
    SWIG_fail_ptr("SmartPrismaticJoint_setMotorEnabled",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (*arg1)->setMotorEnabled(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPrismaticJoint_isMotorEnabled(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PrismaticJoint > *arg1 = (boost::shared_ptr< love_box2d::PrismaticJoint > *) 0 ;
  bool result;
  
  SWIG_check_num_args("isMotorEnabled",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("isMotorEnabled",1,"boost::shared_ptr< love_box2d::PrismaticJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,0))){
    SWIG_fail_ptr("SmartPrismaticJoint_isMotorEnabled",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t);
  }
  
  result = (bool)(*arg1)->isMotorEnabled();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPrismaticJoint_setMaxMotorForce(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PrismaticJoint > *arg1 = (boost::shared_ptr< love_box2d::PrismaticJoint > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setMaxMotorForce",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setMaxMotorForce",1,"boost::shared_ptr< love_box2d::PrismaticJoint > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setMaxMotorForce",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,0))){
    SWIG_fail_ptr("SmartPrismaticJoint_setMaxMotorForce",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setMaxMotorForce(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPrismaticJoint_getMaxMotorForce(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PrismaticJoint > *arg1 = (boost::shared_ptr< love_box2d::PrismaticJoint > *) 0 ;
  float result;
  
  SWIG_check_num_args("getMaxMotorForce",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getMaxMotorForce",1,"boost::shared_ptr< love_box2d::PrismaticJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,0))){
    SWIG_fail_ptr("SmartPrismaticJoint_getMaxMotorForce",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t);
  }
  
  result = (float)(*arg1)->getMaxMotorForce();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPrismaticJoint_setMotorSpeed(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PrismaticJoint > *arg1 = (boost::shared_ptr< love_box2d::PrismaticJoint > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setMotorSpeed",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setMotorSpeed",1,"boost::shared_ptr< love_box2d::PrismaticJoint > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setMotorSpeed",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,0))){
    SWIG_fail_ptr("SmartPrismaticJoint_setMotorSpeed",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setMotorSpeed(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPrismaticJoint_getMotorSpeed(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PrismaticJoint > *arg1 = (boost::shared_ptr< love_box2d::PrismaticJoint > *) 0 ;
  float result;
  
  SWIG_check_num_args("getMotorSpeed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getMotorSpeed",1,"boost::shared_ptr< love_box2d::PrismaticJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,0))){
    SWIG_fail_ptr("SmartPrismaticJoint_getMotorSpeed",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t);
  }
  
  result = (float)(*arg1)->getMotorSpeed();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPrismaticJoint_getMotorForce(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PrismaticJoint > *arg1 = (boost::shared_ptr< love_box2d::PrismaticJoint > *) 0 ;
  float result;
  
  SWIG_check_num_args("getMotorForce",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getMotorForce",1,"boost::shared_ptr< love_box2d::PrismaticJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,0))){
    SWIG_fail_ptr("SmartPrismaticJoint_getMotorForce",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t);
  }
  
  result = (float)(*arg1)->getMotorForce();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPrismaticJoint_setLimitsEnabled(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PrismaticJoint > *arg1 = (boost::shared_ptr< love_box2d::PrismaticJoint > *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("setLimitsEnabled",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setLimitsEnabled",1,"boost::shared_ptr< love_box2d::PrismaticJoint > *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("setLimitsEnabled",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,0))){
    SWIG_fail_ptr("SmartPrismaticJoint_setLimitsEnabled",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (*arg1)->setLimitsEnabled(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPrismaticJoint_isLimitsEnabled(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PrismaticJoint > *arg1 = (boost::shared_ptr< love_box2d::PrismaticJoint > *) 0 ;
  bool result;
  
  SWIG_check_num_args("isLimitsEnabled",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("isLimitsEnabled",1,"boost::shared_ptr< love_box2d::PrismaticJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,0))){
    SWIG_fail_ptr("SmartPrismaticJoint_isLimitsEnabled",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t);
  }
  
  result = (bool)(*arg1)->isLimitsEnabled();
  SWIG_arg=0;
  lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPrismaticJoint_setUpperLimit(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PrismaticJoint > *arg1 = (boost::shared_ptr< love_box2d::PrismaticJoint > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setUpperLimit",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setUpperLimit",1,"boost::shared_ptr< love_box2d::PrismaticJoint > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setUpperLimit",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,0))){
    SWIG_fail_ptr("SmartPrismaticJoint_setUpperLimit",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setUpperLimit(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPrismaticJoint_setLowerLimit(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PrismaticJoint > *arg1 = (boost::shared_ptr< love_box2d::PrismaticJoint > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("setLowerLimit",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setLowerLimit",1,"boost::shared_ptr< love_box2d::PrismaticJoint > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setLowerLimit",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,0))){
    SWIG_fail_ptr("SmartPrismaticJoint_setLowerLimit",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (*arg1)->setLowerLimit(arg2);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPrismaticJoint_setLimits(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PrismaticJoint > *arg1 = (boost::shared_ptr< love_box2d::PrismaticJoint > *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("setLimits",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setLimits",1,"boost::shared_ptr< love_box2d::PrismaticJoint > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("setLimits",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("setLimits",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,0))){
    SWIG_fail_ptr("SmartPrismaticJoint_setLimits",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (*arg1)->setLimits(arg2,arg3);
  SWIG_arg=0;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPrismaticJoint_getLowerLimit(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PrismaticJoint > *arg1 = (boost::shared_ptr< love_box2d::PrismaticJoint > *) 0 ;
  float result;
  
  SWIG_check_num_args("getLowerLimit",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getLowerLimit",1,"boost::shared_ptr< love_box2d::PrismaticJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,0))){
    SWIG_fail_ptr("SmartPrismaticJoint_getLowerLimit",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t);
  }
  
  result = (float)(*arg1)->getLowerLimit();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SmartPrismaticJoint_getUpperLimit(lua_State* L) {
  int SWIG_arg = -1;
  boost::shared_ptr< love_box2d::PrismaticJoint > *arg1 = (boost::shared_ptr< love_box2d::PrismaticJoint > *) 0 ;
  float result;
  
  SWIG_check_num_args("getUpperLimit",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getUpperLimit",1,"boost::shared_ptr< love_box2d::PrismaticJoint > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,0))){
    SWIG_fail_ptr("SmartPrismaticJoint_getUpperLimit",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t);
  }
  
  result = (float)(*arg1)->getUpperLimit();
  SWIG_arg=0;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_SmartPrismaticJoint(void *obj) {
boost::shared_ptr< love_box2d::PrismaticJoint > *arg1 = (boost::shared_ptr< love_box2d::PrismaticJoint > *) obj;
delete arg1;
}
static swig_lua_method swig_boost_shared_ptr_Sl_love_box2d_PrismaticJoint_Sg__methods[] = {
	{"getLimits", love_box2d::_wrap_method_PrismaticJoint_getLimits},
	{"getReactionForce", love_box2d::_wrap_method_PrismaticJoint_getReactionForce},
	{"getAnchors", love_box2d::_wrap_method_PrismaticJoint_getAnchors},
	{"destroy", love_box2d::_wrap_method_PrismaticJoint_destroy},
    {"__deref__", _wrap_SmartPrismaticJoint___deref__}, 
    {"getTranslation", _wrap_SmartPrismaticJoint_getTranslation}, 
    {"getSpeed", _wrap_SmartPrismaticJoint_getSpeed}, 
    {"setMotorEnabled", _wrap_SmartPrismaticJoint_setMotorEnabled}, 
    {"isMotorEnabled", _wrap_SmartPrismaticJoint_isMotorEnabled}, 
    {"setMaxMotorForce", _wrap_SmartPrismaticJoint_setMaxMotorForce}, 
    {"getMaxMotorForce", _wrap_SmartPrismaticJoint_getMaxMotorForce}, 
    {"setMotorSpeed", _wrap_SmartPrismaticJoint_setMotorSpeed}, 
    {"getMotorSpeed", _wrap_SmartPrismaticJoint_getMotorSpeed}, 
    {"getMotorForce", _wrap_SmartPrismaticJoint_getMotorForce}, 
    {"setLimitsEnabled", _wrap_SmartPrismaticJoint_setLimitsEnabled}, 
    {"isLimitsEnabled", _wrap_SmartPrismaticJoint_isLimitsEnabled}, 
    {"setUpperLimit", _wrap_SmartPrismaticJoint_setUpperLimit}, 
    {"setLowerLimit", _wrap_SmartPrismaticJoint_setLowerLimit}, 
    {"setLimits", _wrap_SmartPrismaticJoint_setLimits}, 
    {"getLowerLimit", _wrap_SmartPrismaticJoint_getLowerLimit}, 
    {"getUpperLimit", _wrap_SmartPrismaticJoint_getUpperLimit}, 
    {0,0}
};
static swig_lua_attribute swig_boost_shared_ptr_Sl_love_box2d_PrismaticJoint_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_boost_shared_ptr_Sl_love_box2d_PrismaticJoint_Sg__bases[] = {0};
static const char *swig_boost_shared_ptr_Sl_love_box2d_PrismaticJoint_Sg__base_names[] = {0};
static swig_lua_class _wrap_class_boost_shared_ptr_Sl_love_box2d_PrismaticJoint_Sg_ = { "SmartPrismaticJoint", &SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,0, swig_delete_SmartPrismaticJoint, swig_boost_shared_ptr_Sl_love_box2d_PrismaticJoint_Sg__methods, swig_boost_shared_ptr_Sl_love_box2d_PrismaticJoint_Sg__attributes, swig_boost_shared_ptr_Sl_love_box2d_PrismaticJoint_Sg__bases, swig_boost_shared_ptr_Sl_love_box2d_PrismaticJoint_Sg__base_names };

static int _wrap_newWorld__SWIG_0(lua_State* L) {
  int SWIG_arg = -1;
  float arg1 ;
  float arg2 ;
  float arg3 ;
  float arg4 ;
  float arg5 ;
  float arg6 ;
  bool arg7 ;
  love_box2d::pWorld result;
  
  SWIG_check_num_args("love_box2d::newWorld",7,7)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("love_box2d::newWorld",1,"float");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("love_box2d::newWorld",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("love_box2d::newWorld",3,"float");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("love_box2d::newWorld",4,"float");
  if(!lua_isnumber(L,5)) SWIG_fail_arg("love_box2d::newWorld",5,"float");
  if(!lua_isnumber(L,6)) SWIG_fail_arg("love_box2d::newWorld",6,"float");
  if(!lua_isboolean(L,7)) SWIG_fail_arg("love_box2d::newWorld",7,"bool");
  arg1 = (float)lua_tonumber(L, 1);
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (float)lua_tonumber(L, 4);
  arg5 = (float)lua_tonumber(L, 5);
  arg6 = (float)lua_tonumber(L, 6);
  arg7 = (lua_toboolean(L, 7)!=0);
  result = love_box2d::newWorld(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
  SWIG_arg=0;
  {
    love_box2d::pWorld * resultptr = new love_box2d::pWorld((love_box2d::pWorld &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_newWorld__SWIG_1(lua_State* L) {
  int SWIG_arg = -1;
  float arg1 ;
  float arg2 ;
  love_box2d::pWorld result;
  
  SWIG_check_num_args("love_box2d::newWorld",2,2)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("love_box2d::newWorld",1,"float");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("love_box2d::newWorld",2,"float");
  arg1 = (float)lua_tonumber(L, 1);
  arg2 = (float)lua_tonumber(L, 2);
  result = love_box2d::newWorld(arg1,arg2);
  SWIG_arg=0;
  {
    love_box2d::pWorld * resultptr = new love_box2d::pWorld((love_box2d::pWorld &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_newWorld(lua_State* L) {
  int argc;
  int argv[8]={
    1,2,3,4,5,6,7,8
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_newWorld__SWIG_1(L);
      }
    }
  }
  if (argc == 7) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isnumber(L,argv[4]);
            }
            if (_v) {
              {
                _v = lua_isnumber(L,argv[5]);
              }
              if (_v) {
                {
                  _v = lua_isboolean(L,argv[6]);
                }
                if (_v) {
                  return _wrap_newWorld__SWIG_0(L);
                }
              }
            }
          }
        }
      }
    }
  }
  
  lua_pushstring(L,"No matching function for overloaded 'newWorld'");
  lua_error(L);return 0;
}


static int _wrap_newBody__SWIG_0(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::pWorld arg1 ;
  float arg2 ;
  float arg3 ;
  float arg4 ;
  love_box2d::pBody result;
  love_box2d::pWorld *argp1 ;
  
  SWIG_check_num_args("love_box2d::newBody",4,4)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("love_box2d::newBody",1,"love_box2d::pWorld");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("love_box2d::newBody",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("love_box2d::newBody",3,"float");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("love_box2d::newBody",4,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&argp1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t,0))){
    SWIG_fail_ptr("newBody",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t);
  }
  arg1 = *argp1;
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (float)lua_tonumber(L, 4);
  result = love_box2d::newBody(arg1,arg2,arg3,arg4);
  SWIG_arg=0;
  {
    love_box2d::pBody * resultptr = new love_box2d::pBody((love_box2d::pBody &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_newBody__SWIG_1(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::pWorld arg1 ;
  float arg2 ;
  float arg3 ;
  love_box2d::pBody result;
  love_box2d::pWorld *argp1 ;
  
  SWIG_check_num_args("love_box2d::newBody",3,3)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("love_box2d::newBody",1,"love_box2d::pWorld");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("love_box2d::newBody",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("love_box2d::newBody",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&argp1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t,0))){
    SWIG_fail_ptr("newBody",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t);
  }
  arg1 = *argp1;
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  result = love_box2d::newBody(arg1,arg2,arg3);
  SWIG_arg=0;
  {
    love_box2d::pBody * resultptr = new love_box2d::pBody((love_box2d::pBody &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_newBody__SWIG_2(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::pWorld arg1 ;
  love_box2d::pBody result;
  love_box2d::pWorld *argp1 ;
  
  SWIG_check_num_args("love_box2d::newBody",1,1)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("love_box2d::newBody",1,"love_box2d::pWorld");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&argp1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t,0))){
    SWIG_fail_ptr("newBody",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t);
  }
  arg1 = *argp1;
  
  result = love_box2d::newBody(arg1);
  SWIG_arg=0;
  {
    love_box2d::pBody * resultptr = new love_box2d::pBody((love_box2d::pBody &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_newBody(lua_State* L) {
  int argc;
  int argv[5]={
    1,2,3,4,5
  };
  
  argc = lua_gettop(L);
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_newBody__SWIG_2(L);
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_newBody__SWIG_1(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            return _wrap_newBody__SWIG_0(L);
          }
        }
      }
    }
  }
  
  lua_pushstring(L,"No matching function for overloaded 'newBody'");
  lua_error(L);return 0;
}


static int _wrap_newCircleShape__SWIG_0(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::pBody arg1 ;
  float arg2 ;
  love_box2d::pCircleShape result;
  love_box2d::pBody *argp1 ;
  
  SWIG_check_num_args("love_box2d::newCircleShape",2,2)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("love_box2d::newCircleShape",1,"love_box2d::pBody");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("love_box2d::newCircleShape",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&argp1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("newCircleShape",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  arg1 = *argp1;
  
  arg2 = (float)lua_tonumber(L, 2);
  result = love_box2d::newCircleShape(arg1,arg2);
  SWIG_arg=0;
  {
    love_box2d::pCircleShape * resultptr = new love_box2d::pCircleShape((love_box2d::pCircleShape &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_newCircleShape__SWIG_1(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::pBody arg1 ;
  float arg2 ;
  float arg3 ;
  float arg4 ;
  love_box2d::pCircleShape result;
  love_box2d::pBody *argp1 ;
  
  SWIG_check_num_args("love_box2d::newCircleShape",4,4)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("love_box2d::newCircleShape",1,"love_box2d::pBody");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("love_box2d::newCircleShape",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("love_box2d::newCircleShape",3,"float");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("love_box2d::newCircleShape",4,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&argp1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("newCircleShape",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  arg1 = *argp1;
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (float)lua_tonumber(L, 4);
  result = love_box2d::newCircleShape(arg1,arg2,arg3,arg4);
  SWIG_arg=0;
  {
    love_box2d::pCircleShape * resultptr = new love_box2d::pCircleShape((love_box2d::pCircleShape &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_newCircleShape(lua_State* L) {
  int argc;
  int argv[5]={
    1,2,3,4,5
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_newCircleShape__SWIG_0(L);
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            return _wrap_newCircleShape__SWIG_1(L);
          }
        }
      }
    }
  }
  
  lua_pushstring(L,"No matching function for overloaded 'newCircleShape'");
  lua_error(L);return 0;
}


static int _wrap_newRectangleShape__SWIG_0(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::pBody arg1 ;
  float arg2 ;
  float arg3 ;
  love_box2d::pPolygonShape result;
  love_box2d::pBody *argp1 ;
  
  SWIG_check_num_args("love_box2d::newRectangleShape",3,3)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("love_box2d::newRectangleShape",1,"love_box2d::pBody");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("love_box2d::newRectangleShape",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("love_box2d::newRectangleShape",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&argp1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("newRectangleShape",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  arg1 = *argp1;
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  result = love_box2d::newRectangleShape(arg1,arg2,arg3);
  SWIG_arg=0;
  {
    love_box2d::pPolygonShape * resultptr = new love_box2d::pPolygonShape((love_box2d::pPolygonShape &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_newRectangleShape__SWIG_1(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::pBody arg1 ;
  float arg2 ;
  float arg3 ;
  float arg4 ;
  float arg5 ;
  love_box2d::pPolygonShape result;
  love_box2d::pBody *argp1 ;
  
  SWIG_check_num_args("love_box2d::newRectangleShape",5,5)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("love_box2d::newRectangleShape",1,"love_box2d::pBody");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("love_box2d::newRectangleShape",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("love_box2d::newRectangleShape",3,"float");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("love_box2d::newRectangleShape",4,"float");
  if(!lua_isnumber(L,5)) SWIG_fail_arg("love_box2d::newRectangleShape",5,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&argp1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("newRectangleShape",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  arg1 = *argp1;
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (float)lua_tonumber(L, 4);
  arg5 = (float)lua_tonumber(L, 5);
  result = love_box2d::newRectangleShape(arg1,arg2,arg3,arg4,arg5);
  SWIG_arg=0;
  {
    love_box2d::pPolygonShape * resultptr = new love_box2d::pPolygonShape((love_box2d::pPolygonShape &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_newRectangleShape__SWIG_2(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::pBody arg1 ;
  float arg2 ;
  float arg3 ;
  float arg4 ;
  float arg5 ;
  float arg6 ;
  love_box2d::pPolygonShape result;
  love_box2d::pBody *argp1 ;
  
  SWIG_check_num_args("love_box2d::newRectangleShape",6,6)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("love_box2d::newRectangleShape",1,"love_box2d::pBody");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("love_box2d::newRectangleShape",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("love_box2d::newRectangleShape",3,"float");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("love_box2d::newRectangleShape",4,"float");
  if(!lua_isnumber(L,5)) SWIG_fail_arg("love_box2d::newRectangleShape",5,"float");
  if(!lua_isnumber(L,6)) SWIG_fail_arg("love_box2d::newRectangleShape",6,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&argp1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("newRectangleShape",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  arg1 = *argp1;
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (float)lua_tonumber(L, 4);
  arg5 = (float)lua_tonumber(L, 5);
  arg6 = (float)lua_tonumber(L, 6);
  result = love_box2d::newRectangleShape(arg1,arg2,arg3,arg4,arg5,arg6);
  SWIG_arg=0;
  {
    love_box2d::pPolygonShape * resultptr = new love_box2d::pPolygonShape((love_box2d::pPolygonShape &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_newRectangleShape(lua_State* L) {
  int argc;
  int argv[7]={
    1,2,3,4,5,6,7
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_newRectangleShape__SWIG_0(L);
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isnumber(L,argv[4]);
            }
            if (_v) {
              return _wrap_newRectangleShape__SWIG_1(L);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isnumber(L,argv[4]);
            }
            if (_v) {
              {
                _v = lua_isnumber(L,argv[5]);
              }
              if (_v) {
                return _wrap_newRectangleShape__SWIG_2(L);
              }
            }
          }
        }
      }
    }
  }
  
  lua_pushstring(L,"No matching function for overloaded 'newRectangleShape'");
  lua_error(L);return 0;
}


static int _wrap_newDistanceJoint(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::pBody arg1 ;
  love_box2d::pBody arg2 ;
  float arg3 ;
  float arg4 ;
  float arg5 ;
  float arg6 ;
  love_box2d::pDistanceJoint result;
  love_box2d::pBody *argp1 ;
  love_box2d::pBody *argp2 ;
  
  SWIG_check_num_args("love_box2d::newDistanceJoint",6,6)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("love_box2d::newDistanceJoint",1,"love_box2d::pBody");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("love_box2d::newDistanceJoint",2,"love_box2d::pBody");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("love_box2d::newDistanceJoint",3,"float");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("love_box2d::newDistanceJoint",4,"float");
  if(!lua_isnumber(L,5)) SWIG_fail_arg("love_box2d::newDistanceJoint",5,"float");
  if(!lua_isnumber(L,6)) SWIG_fail_arg("love_box2d::newDistanceJoint",6,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&argp1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("newDistanceJoint",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  arg1 = *argp1;
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("newDistanceJoint",2,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  arg2 = *argp2;
  
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (float)lua_tonumber(L, 4);
  arg5 = (float)lua_tonumber(L, 5);
  arg6 = (float)lua_tonumber(L, 6);
  result = love_box2d::newDistanceJoint(arg1,arg2,arg3,arg4,arg5,arg6);
  SWIG_arg=0;
  {
    love_box2d::pDistanceJoint * resultptr = new love_box2d::pDistanceJoint((love_box2d::pDistanceJoint &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_newMouseJoint(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::pBody arg1 ;
  float arg2 ;
  float arg3 ;
  love_box2d::pMouseJoint result;
  love_box2d::pBody *argp1 ;
  
  SWIG_check_num_args("love_box2d::newMouseJoint",3,3)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("love_box2d::newMouseJoint",1,"love_box2d::pBody");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("love_box2d::newMouseJoint",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("love_box2d::newMouseJoint",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&argp1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("newMouseJoint",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  arg1 = *argp1;
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  result = love_box2d::newMouseJoint(arg1,arg2,arg3);
  SWIG_arg=0;
  {
    love_box2d::pMouseJoint * resultptr = new love_box2d::pMouseJoint((love_box2d::pMouseJoint &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__MouseJoint_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_newRevoluteJoint(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::pBody arg1 ;
  love_box2d::pBody arg2 ;
  float arg3 ;
  float arg4 ;
  love_box2d::pRevoluteJoint result;
  love_box2d::pBody *argp1 ;
  love_box2d::pBody *argp2 ;
  
  SWIG_check_num_args("love_box2d::newRevoluteJoint",4,4)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("love_box2d::newRevoluteJoint",1,"love_box2d::pBody");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("love_box2d::newRevoluteJoint",2,"love_box2d::pBody");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("love_box2d::newRevoluteJoint",3,"float");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("love_box2d::newRevoluteJoint",4,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&argp1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("newRevoluteJoint",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  arg1 = *argp1;
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("newRevoluteJoint",2,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  arg2 = *argp2;
  
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (float)lua_tonumber(L, 4);
  result = love_box2d::newRevoluteJoint(arg1,arg2,arg3,arg4);
  SWIG_arg=0;
  {
    love_box2d::pRevoluteJoint * resultptr = new love_box2d::pRevoluteJoint((love_box2d::pRevoluteJoint &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_newPrismaticJoint(lua_State* L) {
  int SWIG_arg = -1;
  love_box2d::pBody arg1 ;
  love_box2d::pBody arg2 ;
  float arg3 ;
  float arg4 ;
  float arg5 ;
  float arg6 ;
  love_box2d::pPrismaticJoint result;
  love_box2d::pBody *argp1 ;
  love_box2d::pBody *argp2 ;
  
  SWIG_check_num_args("love_box2d::newPrismaticJoint",6,6)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("love_box2d::newPrismaticJoint",1,"love_box2d::pBody");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("love_box2d::newPrismaticJoint",2,"love_box2d::pBody");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("love_box2d::newPrismaticJoint",3,"float");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("love_box2d::newPrismaticJoint",4,"float");
  if(!lua_isnumber(L,5)) SWIG_fail_arg("love_box2d::newPrismaticJoint",5,"float");
  if(!lua_isnumber(L,6)) SWIG_fail_arg("love_box2d::newPrismaticJoint",6,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&argp1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("newPrismaticJoint",1,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  arg1 = *argp1;
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
    SWIG_fail_ptr("newPrismaticJoint",2,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
  }
  arg2 = *argp2;
  
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (float)lua_tonumber(L, 4);
  arg5 = (float)lua_tonumber(L, 5);
  arg6 = (float)lua_tonumber(L, 6);
  result = love_box2d::newPrismaticJoint(arg1,arg2,arg3,arg4,arg5,arg6);
  SWIG_arg=0;
  {
    love_box2d::pPrismaticJoint * resultptr = new love_box2d::pPrismaticJoint((love_box2d::pPrismaticJoint &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


#ifdef __cplusplus
}
#endif

static const struct luaL_reg swig_commands[] = {
    { "newWorld",_wrap_newWorld},
    { "newBody",_wrap_newBody},
    { "newCircleShape",_wrap_newCircleShape},
    { "newRectangleShape",_wrap_newRectangleShape},
    { "newDistanceJoint", _wrap_newDistanceJoint},
    { "newMouseJoint", _wrap_newMouseJoint},
    { "newRevoluteJoint", _wrap_newRevoluteJoint},
    { "newPrismaticJoint", _wrap_newPrismaticJoint},
    { "newPolygonShape",love_box2d::newPolygonShape},
    {0,0}
};

static swig_lua_var_info swig_variables[] = {
    {0,0,0}
};

static swig_lua_const_info swig_constants[] = {
    {0,0,0,0,0,0}
};

/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */

static void *_p_love_box2d__CircleShapeTo_p_love_box2d__Shape(void *x, int *newmemory) {
    return (void *)((love_box2d::Shape *)  ((love_box2d::CircleShape *) x));
}
static void *_p_love_box2d__PolygonShapeTo_p_love_box2d__Shape(void *x, int *newmemory) {
    return (void *)((love_box2d::Shape *)  ((love_box2d::PolygonShape *) x));
}
static swig_type_info _swigt__p_boost__shared_ptrT_love_box2d__Body_t = {"_p_boost__shared_ptrT_love_box2d__Body_t", "love_box2d::pBody *|boost::shared_ptr< love_box2d::Body > *", 0, 0, (void*)&_wrap_class_boost_shared_ptr_Sl_love_box2d_Body_Sg_, 0};
static swig_type_info _swigt__p_boost__shared_ptrT_love_box2d__CircleShape_t = {"_p_boost__shared_ptrT_love_box2d__CircleShape_t", "boost::shared_ptr< love_box2d::CircleShape > *|love_box2d::pCircleShape *", 0, 0, (void*)&_wrap_class_boost_shared_ptr_Sl_love_box2d_CircleShape_Sg_, 0};
static swig_type_info _swigt__p_boost__shared_ptrT_love_box2d__Contact_t = {"_p_boost__shared_ptrT_love_box2d__Contact_t", "boost::shared_ptr< love_box2d::Contact > *|love_box2d::pContact *", 0, 0, (void*)&_wrap_class_boost_shared_ptr_Sl_love_box2d_Contact_Sg_, 0};
static swig_type_info _swigt__p_boost__shared_ptrT_love_box2d__DistanceJoint_t = {"_p_boost__shared_ptrT_love_box2d__DistanceJoint_t", "love_box2d::pDistanceJoint *|boost::shared_ptr< love_box2d::DistanceJoint > *", 0, 0, (void*)&_wrap_class_boost_shared_ptr_Sl_love_box2d_DistanceJoint_Sg_, 0};
static swig_type_info _swigt__p_boost__shared_ptrT_love_box2d__Joint_t = {"_p_boost__shared_ptrT_love_box2d__Joint_t", "love_box2d::pJoint *|boost::shared_ptr< love_box2d::Joint > *", 0, 0, (void*)&_wrap_class_boost_shared_ptr_Sl_love_box2d_Joint_Sg_, 0};
static swig_type_info _swigt__p_boost__shared_ptrT_love_box2d__MouseJoint_t = {"_p_boost__shared_ptrT_love_box2d__MouseJoint_t", "love_box2d::pMouseJoint *|boost::shared_ptr< love_box2d::MouseJoint > *", 0, 0, (void*)&_wrap_class_boost_shared_ptr_Sl_love_box2d_MouseJoint_Sg_, 0};
static swig_type_info _swigt__p_boost__shared_ptrT_love_box2d__PolygonShape_t = {"_p_boost__shared_ptrT_love_box2d__PolygonShape_t", "boost::shared_ptr< love_box2d::PolygonShape > *|love_box2d::pPolygonShape *", 0, 0, (void*)&_wrap_class_boost_shared_ptr_Sl_love_box2d_PolygonShape_Sg_, 0};
static swig_type_info _swigt__p_boost__shared_ptrT_love_box2d__PrismaticJoint_t = {"_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t", "love_box2d::pPrismaticJoint *|boost::shared_ptr< love_box2d::PrismaticJoint > *", 0, 0, (void*)&_wrap_class_boost_shared_ptr_Sl_love_box2d_PrismaticJoint_Sg_, 0};
static swig_type_info _swigt__p_boost__shared_ptrT_love_box2d__RevoluteJoint_t = {"_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t", "love_box2d::pRevoluteJoint *|boost::shared_ptr< love_box2d::RevoluteJoint > *", 0, 0, (void*)&_wrap_class_boost_shared_ptr_Sl_love_box2d_RevoluteJoint_Sg_, 0};
static swig_type_info _swigt__p_boost__shared_ptrT_love_box2d__Shape_t = {"_p_boost__shared_ptrT_love_box2d__Shape_t", "boost::shared_ptr< love_box2d::Shape > *|love_box2d::pShape *", 0, 0, (void*)&_wrap_class_boost_shared_ptr_Sl_love_box2d_Shape_Sg_, 0};
static swig_type_info _swigt__p_boost__shared_ptrT_love_box2d__World_t = {"_p_boost__shared_ptrT_love_box2d__World_t", "boost::shared_ptr< love_box2d::World > *|love_box2d::pWorld *", 0, 0, (void*)&_wrap_class_boost_shared_ptr_Sl_love_box2d_World_Sg_, 0};
static swig_type_info _swigt__p_love_box2d__Body = {"_p_love_box2d__Body", "love_box2d::Body *", 0, 0, (void*)&_wrap_class_love_box2d_Body, 0};
static swig_type_info _swigt__p_love_box2d__CircleShape = {"_p_love_box2d__CircleShape", "love_box2d::CircleShape *", 0, 0, (void*)&_wrap_class_love_box2d_CircleShape, 0};
static swig_type_info _swigt__p_love_box2d__Contact = {"_p_love_box2d__Contact", "love_box2d::Contact *", 0, 0, (void*)&_wrap_class_love_box2d_Contact, 0};
static swig_type_info _swigt__p_love_box2d__DistanceJoint = {"_p_love_box2d__DistanceJoint", "love_box2d::DistanceJoint *", 0, 0, (void*)&_wrap_class_love_box2d_DistanceJoint, 0};
static swig_type_info _swigt__p_love_box2d__Joint = {"_p_love_box2d__Joint", "love_box2d::Joint *", 0, 0, (void*)&_wrap_class_love_box2d_Joint, 0};
static swig_type_info _swigt__p_love_box2d__MouseJoint = {"_p_love_box2d__MouseJoint", "love_box2d::MouseJoint *", 0, 0, (void*)&_wrap_class_love_box2d_MouseJoint, 0};
static swig_type_info _swigt__p_love_box2d__PolygonShape = {"_p_love_box2d__PolygonShape", "love_box2d::PolygonShape *", 0, 0, (void*)&_wrap_class_love_box2d_PolygonShape, 0};
static swig_type_info _swigt__p_love_box2d__PrismaticJoint = {"_p_love_box2d__PrismaticJoint", "love_box2d::PrismaticJoint *", 0, 0, (void*)&_wrap_class_love_box2d_PrismaticJoint, 0};
static swig_type_info _swigt__p_love_box2d__RevoluteJoint = {"_p_love_box2d__RevoluteJoint", "love_box2d::RevoluteJoint *", 0, 0, (void*)&_wrap_class_love_box2d_RevoluteJoint, 0};
static swig_type_info _swigt__p_love_box2d__Shape = {"_p_love_box2d__Shape", "love_box2d::Shape *", 0, 0, (void*)&_wrap_class_love_box2d_Shape, 0};
static swig_type_info _swigt__p_love_box2d__World = {"_p_love_box2d__World", "love_box2d::World *", 0, 0, (void*)&_wrap_class_love_box2d_World, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__p_boost__shared_ptrT_love_box2d__Body_t,
  &_swigt__p_boost__shared_ptrT_love_box2d__CircleShape_t,
  &_swigt__p_boost__shared_ptrT_love_box2d__Contact_t,
  &_swigt__p_boost__shared_ptrT_love_box2d__DistanceJoint_t,
  &_swigt__p_boost__shared_ptrT_love_box2d__Joint_t,
  &_swigt__p_boost__shared_ptrT_love_box2d__MouseJoint_t,
  &_swigt__p_boost__shared_ptrT_love_box2d__PolygonShape_t,
  &_swigt__p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,
  &_swigt__p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,
  &_swigt__p_boost__shared_ptrT_love_box2d__Shape_t,
  &_swigt__p_boost__shared_ptrT_love_box2d__World_t,
  &_swigt__p_love_box2d__Body,
  &_swigt__p_love_box2d__CircleShape,
  &_swigt__p_love_box2d__Contact,
  &_swigt__p_love_box2d__DistanceJoint,
  &_swigt__p_love_box2d__Joint,
  &_swigt__p_love_box2d__MouseJoint,
  &_swigt__p_love_box2d__PolygonShape,
  &_swigt__p_love_box2d__PrismaticJoint,
  &_swigt__p_love_box2d__RevoluteJoint,
  &_swigt__p_love_box2d__Shape,
  &_swigt__p_love_box2d__World,
};

static swig_cast_info _swigc__p_boost__shared_ptrT_love_box2d__Body_t[] = {  {&_swigt__p_boost__shared_ptrT_love_box2d__Body_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_love_box2d__CircleShape_t[] = {  {&_swigt__p_boost__shared_ptrT_love_box2d__CircleShape_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_love_box2d__Contact_t[] = {  {&_swigt__p_boost__shared_ptrT_love_box2d__Contact_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_love_box2d__DistanceJoint_t[] = {  {&_swigt__p_boost__shared_ptrT_love_box2d__DistanceJoint_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_love_box2d__Joint_t[] = {  {&_swigt__p_boost__shared_ptrT_love_box2d__Joint_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_love_box2d__MouseJoint_t[] = {  {&_swigt__p_boost__shared_ptrT_love_box2d__MouseJoint_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_love_box2d__PolygonShape_t[] = {  {&_swigt__p_boost__shared_ptrT_love_box2d__PolygonShape_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_love_box2d__PrismaticJoint_t[] = {  {&_swigt__p_boost__shared_ptrT_love_box2d__PrismaticJoint_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_love_box2d__RevoluteJoint_t[] = {  {&_swigt__p_boost__shared_ptrT_love_box2d__RevoluteJoint_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_love_box2d__Shape_t[] = {  {&_swigt__p_boost__shared_ptrT_love_box2d__Shape_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_love_box2d__World_t[] = {  {&_swigt__p_boost__shared_ptrT_love_box2d__World_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_love_box2d__Body[] = {  {&_swigt__p_love_box2d__Body, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_love_box2d__CircleShape[] = {  {&_swigt__p_love_box2d__CircleShape, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_love_box2d__Contact[] = {  {&_swigt__p_love_box2d__Contact, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_love_box2d__DistanceJoint[] = {  {&_swigt__p_love_box2d__DistanceJoint, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_love_box2d__Joint[] = {  {&_swigt__p_love_box2d__Joint, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_love_box2d__MouseJoint[] = {  {&_swigt__p_love_box2d__MouseJoint, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_love_box2d__PolygonShape[] = {  {&_swigt__p_love_box2d__PolygonShape, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_love_box2d__PrismaticJoint[] = {  {&_swigt__p_love_box2d__PrismaticJoint, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_love_box2d__RevoluteJoint[] = {  {&_swigt__p_love_box2d__RevoluteJoint, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_love_box2d__Shape[] = {  {&_swigt__p_love_box2d__CircleShape, _p_love_box2d__CircleShapeTo_p_love_box2d__Shape, 0, 0},  {&_swigt__p_love_box2d__Shape, 0, 0, 0},  {&_swigt__p_love_box2d__PolygonShape, _p_love_box2d__PolygonShapeTo_p_love_box2d__Shape, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_love_box2d__World[] = {  {&_swigt__p_love_box2d__World, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__p_boost__shared_ptrT_love_box2d__Body_t,
  _swigc__p_boost__shared_ptrT_love_box2d__CircleShape_t,
  _swigc__p_boost__shared_ptrT_love_box2d__Contact_t,
  _swigc__p_boost__shared_ptrT_love_box2d__DistanceJoint_t,
  _swigc__p_boost__shared_ptrT_love_box2d__Joint_t,
  _swigc__p_boost__shared_ptrT_love_box2d__MouseJoint_t,
  _swigc__p_boost__shared_ptrT_love_box2d__PolygonShape_t,
  _swigc__p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,
  _swigc__p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,
  _swigc__p_boost__shared_ptrT_love_box2d__Shape_t,
  _swigc__p_boost__shared_ptrT_love_box2d__World_t,
  _swigc__p_love_box2d__Body,
  _swigc__p_love_box2d__CircleShape,
  _swigc__p_love_box2d__Contact,
  _swigc__p_love_box2d__DistanceJoint,
  _swigc__p_love_box2d__Joint,
  _swigc__p_love_box2d__MouseJoint,
  _swigc__p_love_box2d__PolygonShape,
  _swigc__p_love_box2d__PrismaticJoint,
  _swigc__p_love_box2d__RevoluteJoint,
  _swigc__p_love_box2d__Shape,
  _swigc__p_love_box2d__World,
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */

/* -----------------------------------------------------------------------------
 * Type initialization:
 * This problem is tough by the requirement that no dynamic 
 * memory is used. Also, since swig_type_info structures store pointers to 
 * swig_cast_info structures and swig_cast_info structures store pointers back
 * to swig_type_info structures, we need some lookup code at initialization. 
 * The idea is that swig generates all the structures that are needed. 
 * The runtime then collects these partially filled structures. 
 * The SWIG_InitializeModule function takes these initial arrays out of 
 * swig_module, and does all the lookup, filling in the swig_module.types
 * array with the correct data and linking the correct swig_cast_info
 * structures together.
 *
 * The generated swig_type_info structures are assigned staticly to an initial 
 * array. We just loop through that array, and handle each type individually.
 * First we lookup if this type has been already loaded, and if so, use the
 * loaded structure instead of the generated one. Then we have to fill in the
 * cast linked list. The cast data is initially stored in something like a
 * two-dimensional array. Each row corresponds to a type (there are the same
 * number of rows as there are in the swig_type_initial array). Each entry in
 * a column is one of the swig_cast_info structures for that type.
 * The cast_initial array is actually an array of arrays, because each row has
 * a variable number of columns. So to actually build the cast linked list,
 * we find the array of casts associated with the type, and loop through it 
 * adding the casts to the list. The one last trick we need to do is making
 * sure the type pointer in the swig_cast_info struct is correct.
 *
 * First off, we lookup the cast->type name to see if it is already loaded. 
 * There are three cases to handle:
 *  1) If the cast->type has already been loaded AND the type we are adding
 *     casting info to has not been loaded (it is in this module), THEN we
 *     replace the cast->type pointer with the type pointer that has already
 *     been loaded.
 *  2) If BOTH types (the one we are adding casting info to, and the 
 *     cast->type) are loaded, THEN the cast info has already been loaded by
 *     the previous module so we just ignore it.
 *  3) Finally, if cast->type has not already been loaded, then we add that
 *     swig_cast_info to the linked list (because the cast->type) pointer will
 *     be correct.
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#if 0
} /* c-mode */
#endif
#endif

#if 0
#define SWIGRUNTIME_DEBUG
#endif


SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
  size_t i;
  swig_module_info *module_head, *iter;
  int found, init;

  clientdata = clientdata;

  /* check to see if the circular list has been setup, if not, set it up */
  if (swig_module.next==0) {
    /* Initialize the swig_module */
    swig_module.type_initial = swig_type_initial;
    swig_module.cast_initial = swig_cast_initial;
    swig_module.next = &swig_module;
    init = 1;
  } else {
    init = 0;
  }

  /* Try and load any already created modules */
  module_head = SWIG_GetModule(clientdata);
  if (!module_head) {
    /* This is the first module loaded for this interpreter */
    /* so set the swig module into the interpreter */
    SWIG_SetModule(clientdata, &swig_module);
    module_head = &swig_module;
  } else {
    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
    found=0;
    iter=module_head;
    do {
      if (iter==&swig_module) {
        found=1;
        break;
      }
      iter=iter->next;
    } while (iter!= module_head);

    /* if the is found in the list, then all is done and we may leave */
    if (found) return;
    /* otherwise we must add out module into the list */
    swig_module.next = module_head->next;
    module_head->next = &swig_module;
  }

  /* When multiple interpeters are used, a module could have already been initialized in
     a different interpreter, but not yet have a pointer in this interpreter.
     In this case, we do not want to continue adding types... everything should be
     set up already */
  if (init == 0) return;

  /* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
#endif
  for (i = 0; i < swig_module.size; ++i) {
    swig_type_info *type = 0;
    swig_type_info *ret;
    swig_cast_info *cast;
  
#ifdef SWIGRUNTIME_DEBUG
    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
#endif

    /* if there is another module already loaded */
    if (swig_module.next != &swig_module) {
      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
    }
    if (type) {
      /* Overwrite clientdata field */
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found type %s\n", type->name);
#endif
      if (swig_module.type_initial[i]->clientdata) {
	type->clientdata = swig_module.type_initial[i]->clientdata;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
#endif
      }
    } else {
      type = swig_module.type_initial[i];
    }

    /* Insert casting types */
    cast = swig_module.cast_initial[i];
    while (cast->type) {
    
      /* Don't need to add information already in the list */
      ret = 0;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
#endif
      if (swig_module.next != &swig_module) {
        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
#ifdef SWIGRUNTIME_DEBUG
	if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
#endif
      }
      if (ret) {
	if (type == swig_module.type_initial[i]) {
#ifdef SWIGRUNTIME_DEBUG
	  printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
#endif
	  cast->type = ret;
	  ret = 0;
	} else {
	  /* Check for casting already in the list */
	  swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
#ifdef SWIGRUNTIME_DEBUG
	  if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
#endif
	  if (!ocast) ret = 0;
	}
      }

      if (!ret) {
#ifdef SWIGRUNTIME_DEBUG
	printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
#endif
        if (type->cast) {
          type->cast->prev = cast;
          cast->next = type->cast;
        }
        type->cast = cast;
      }
      cast++;
    }
    /* Set entry in modules->types array equal to the type */
    swig_module.types[i] = type;
  }
  swig_module.types[i] = 0;

#ifdef SWIGRUNTIME_DEBUG
  printf("**** SWIG_InitializeModule: Cast List ******\n");
  for (i = 0; i < swig_module.size; ++i) {
    int j = 0;
    swig_cast_info *cast = swig_module.cast_initial[i];
    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
    while (cast->type) {
      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
      cast++;
      ++j;
    }
  printf("---- Total casts: %d\n",j);
  }
  printf("**** SWIG_InitializeModule: Cast List ******\n");
#endif
}

/* This function will propagate the clientdata field of type to
* any new swig_type_info structures that have been added into the list
* of equivalent types.  It is like calling
* SWIG_TypeClientData(type, clientdata) a second time.
*/
SWIGRUNTIME void
SWIG_PropagateClientData(void) {
  size_t i;
  swig_cast_info *equiv;
  static int init_run = 0;

  if (init_run) return;
  init_run = 1;

  for (i = 0; i < swig_module.size; i++) {
    if (swig_module.types[i]->clientdata) {
      equiv = swig_module.types[i]->cast;
      while (equiv) {
        if (!equiv->converter) {
          if (equiv->type && !equiv->type->clientdata)
            SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
        }
        equiv = equiv->next;
      }
    }
  }
}

#ifdef __cplusplus
#if 0
{ /* c-mode */
#endif
}
#endif



/* Forward declaration of where the user's %init{} gets inserted */
void SWIG_init_user(lua_State* L );
    
#ifdef __cplusplus
extern "C" {
#endif
/* this is the initialization function
  added at the very end of the code
  the function is always called SWIG_init, but an eariler #define will rename it
*/
SWIGEXPORT int SWIG_init(lua_State* L)
{
  int i;
  /* start with global table */
  lua_pushvalue(L,LUA_GLOBALSINDEX);
  /* SWIG's internal initalisation */
  SWIG_InitializeModule((void*)L);
  SWIG_PropagateClientData();
  /* add a global fn */
  SWIG_Lua_add_function(L,"swig_type",SWIG_Lua_type);
  SWIG_Lua_add_function(L,"swig_equals",SWIG_Lua_equal);
  /* begin the module (its a table with the same name as the module) */
  SWIG_Lua_module_begin(L,SWIG_name);
  /* add commands/functions */
  for (i = 0; swig_commands[i].name; i++){
    SWIG_Lua_module_add_function(L,swig_commands[i].name,swig_commands[i].func);
  }
  /* add variables */
  for (i = 0; swig_variables[i].name; i++){
    SWIG_Lua_module_add_variable(L,swig_variables[i].name,swig_variables[i].get,swig_variables[i].set);
  }
  /* set up base class pointers (the hierachy) */
  for (i = 0; swig_types[i]; i++){
    if (swig_types[i]->clientdata){
      SWIG_Lua_init_base_class(L,(swig_lua_class*)(swig_types[i]->clientdata));
    }
  }
  /* additional registration structs & classes in lua */
  for (i = 0; swig_types[i]; i++){
    if (swig_types[i]->clientdata){
      SWIG_Lua_class_register(L,(swig_lua_class*)(swig_types[i]->clientdata));
    }
  }
  /* constants */
  SWIG_Lua_InstallConstants(L,swig_constants);
  /* invoke user-specific initialization */
  SWIG_init_user(L);
  /* end module */
  lua_pop(L,1);  /* tidy stack (remove module table)*/
  lua_pop(L,1);  /* tidy stack (remove global table)*/
  return 1;
}

#ifdef __cplusplus
}
#endif


const char* SWIG_LUACODE=
  "\n"
  "love.physics = mod_box2d";

void SWIG_init_user(lua_State* L)
{
  /* exec Lua code if applicable */
  SWIG_Lua_dostring(L,SWIG_LUACODE);
}

namespace love_box2d
{
	int __error_index(lua_State * L)	
	{
		return luaL_error(L, "Attempt to index destroyed object.");
	}
    
	bool mod_is_polygonshape(lua_State * L, int idx)            
    {
        swig_lua_userdata* usr = 0;
        swig_cast_info *cast = 0;
        usr=(swig_lua_userdata*)lua_touserdata(L,idx);
        if(!usr) return false;
        cast=SWIG_TypeCheckStruct(usr->type,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t);
        if(cast) return true;
        return false;
    }
        
	boost::shared_ptr<PolygonShape> mod_to_polygonshape(lua_State * L, int idx)            
    {
        love_box2d::pPolygonShape * arg;
        if(!lua_isuserdata(L,idx)) luaL_error(L, "Error, argument is not userdata.");
        if (!SWIG_IsOK(SWIG_ConvertPtr(L,idx,(void**)&arg,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,0))){
              luaL_error(L, "Error, argument is not type PolygonShape.");
        }
        return *arg;
    }
        
	boost::shared_ptr<PolygonShape> * mod_to_polygonshape_ptr(lua_State * L, int idx)            
    {
        love_box2d::pPolygonShape * arg;
        if(!lua_isuserdata(L,idx)) luaL_error(L, "Error, argument is not userdata.");
        if (!SWIG_IsOK(SWIG_ConvertPtr(L,idx,(void**)&arg,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,0))){
              luaL_error(L, "Error, argument is not type PolygonShape.");
        }
        return arg;
    }
        
	void mod_push_polygonshape(lua_State * L, boost::shared_ptr<PolygonShape> polygonshape)            
    {
        love_box2d::pPolygonShape * resultptr = new love_box2d::pPolygonShape((love_box2d::pPolygonShape &) polygonshape);
        SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PolygonShape_t,1);
    }
        
	int _wrap_method_PolygonShape_getData(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pPolygonShape p = mod_to_polygonshape(L, 1);
        lua_remove(L, 1);
        return p->getData(L);
    }
        
	int _wrap_method_PolygonShape_setCategory(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pPolygonShape p = mod_to_polygonshape(L, 1);
        lua_remove(L, 1);
        return p->setCategory(L);
    }
        
	int _wrap_method_PolygonShape_getBoundingBox(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pPolygonShape p = mod_to_polygonshape(L, 1);
        lua_remove(L, 1);
        return p->getBoundingBox(L);
    }
        
	int _wrap_method_PolygonShape_getCategory(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pPolygonShape p = mod_to_polygonshape(L, 1);
        lua_remove(L, 1);
        return p->getCategory(L);
    }
        
	int _wrap_method_PolygonShape_getPoints(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pPolygonShape p = mod_to_polygonshape(L, 1);
        lua_remove(L, 1);
        return p->getPoints(L);
    }
        
	int _wrap_method_PolygonShape_testSegment(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pPolygonShape p = mod_to_polygonshape(L, 1);
        lua_remove(L, 1);
        return p->testSegment(L);
    }
        
	int _wrap_method_PolygonShape_setData(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pPolygonShape p = mod_to_polygonshape(L, 1);
        lua_remove(L, 1);
        return p->setData(L);
    }
        
	int _wrap_method_PolygonShape_getMask(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pPolygonShape p = mod_to_polygonshape(L, 1);
        lua_remove(L, 1);
        return p->getMask(L);
    }
        
	int _wrap_method_PolygonShape_setMask(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pPolygonShape p = mod_to_polygonshape(L, 1);
        lua_remove(L, 1);
        return p->setMask(L);
    }
        
	int _wrap_method_PolygonShape_destroy(lua_State * L)        
	{
		if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
		love_box2d::pPolygonShape * p = mod_to_polygonshape_ptr(L, 1);
		
		// This will destroy memory if it's the last reference.
		p->reset();

		// Create the metatable.
		lua_newtable(L);
		lua_pushcfunction(L, __error_index);
		lua_setfield(L, -2, "__index");

		// Set the metatable.
		lua_setmetatable(L, -2);

		return 0;
	}
        
	bool mod_is_shape(lua_State * L, int idx)            
    {
        swig_lua_userdata* usr = 0;
        swig_cast_info *cast = 0;
        usr=(swig_lua_userdata*)lua_touserdata(L,idx);
        if(!usr) return false;
        cast=SWIG_TypeCheckStruct(usr->type,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t);
        if(cast) return true;
        return false;
    }
        
	boost::shared_ptr<Shape> mod_to_shape(lua_State * L, int idx)            
    {
        love_box2d::pShape * arg;
        if(!lua_isuserdata(L,idx)) luaL_error(L, "Error, argument is not userdata.");
        if (!SWIG_IsOK(SWIG_ConvertPtr(L,idx,(void**)&arg,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t,0))){
              luaL_error(L, "Error, argument is not type Shape.");
        }
        return *arg;
    }
        
	boost::shared_ptr<Shape> * mod_to_shape_ptr(lua_State * L, int idx)            
    {
        love_box2d::pShape * arg;
        if(!lua_isuserdata(L,idx)) luaL_error(L, "Error, argument is not userdata.");
        if (!SWIG_IsOK(SWIG_ConvertPtr(L,idx,(void**)&arg,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t,0))){
              luaL_error(L, "Error, argument is not type Shape.");
        }
        return arg;
    }
        
	void mod_push_shape(lua_State * L, boost::shared_ptr<Shape> shape)            
    {
        love_box2d::pShape * resultptr = new love_box2d::pShape((love_box2d::pShape &) shape);
        SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Shape_t,1);
    }
        
	bool mod_is_body(lua_State * L, int idx)            
    {
        swig_lua_userdata* usr = 0;
        swig_cast_info *cast = 0;
        usr=(swig_lua_userdata*)lua_touserdata(L,idx);
        if(!usr) return false;
        cast=SWIG_TypeCheckStruct(usr->type,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t);
        if(cast) return true;
        return false;
    }
        
	boost::shared_ptr<Body> mod_to_body(lua_State * L, int idx)            
    {
        love_box2d::pBody * arg;
        if(!lua_isuserdata(L,idx)) luaL_error(L, "Error, argument is not userdata.");
        if (!SWIG_IsOK(SWIG_ConvertPtr(L,idx,(void**)&arg,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
              luaL_error(L, "Error, argument is not type Body.");
        }
        return *arg;
    }
        
	boost::shared_ptr<Body> * mod_to_body_ptr(lua_State * L, int idx)            
    {
        love_box2d::pBody * arg;
        if(!lua_isuserdata(L,idx)) luaL_error(L, "Error, argument is not userdata.");
        if (!SWIG_IsOK(SWIG_ConvertPtr(L,idx,(void**)&arg,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,0))){
              luaL_error(L, "Error, argument is not type Body.");
        }
        return arg;
    }
        
	void mod_push_body(lua_State * L, boost::shared_ptr<Body> body)            
    {
        love_box2d::pBody * resultptr = new love_box2d::pBody((love_box2d::pBody &) body);
        SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Body_t,1);
    }
        
	int _wrap_method_Body_getLocalPoint(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pBody p = mod_to_body(L, 1);
        lua_remove(L, 1);
        return p->getLocalPoint(L);
    }
        
	int _wrap_method_Body_getLocalCenter(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pBody p = mod_to_body(L, 1);
        lua_remove(L, 1);
        return p->getLocalCenter(L);
    }
        
	int _wrap_method_Body_getWorldPoint(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pBody p = mod_to_body(L, 1);
        lua_remove(L, 1);
        return p->getWorldPoint(L);
    }
        
	int _wrap_method_Body_getLocalVector(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pBody p = mod_to_body(L, 1);
        lua_remove(L, 1);
        return p->getLocalVector(L);
    }
        
	int _wrap_method_Body_getVelocityLocalPoint(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pBody p = mod_to_body(L, 1);
        lua_remove(L, 1);
        return p->getVelocityLocalPoint(L);
    }
        
	int _wrap_method_Body_getVelocityWorldPoint(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pBody p = mod_to_body(L, 1);
        lua_remove(L, 1);
        return p->getVelocityWorldPoint(L);
    }
        
	int _wrap_method_Body_getPosition(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pBody p = mod_to_body(L, 1);
        lua_remove(L, 1);
        return p->getPosition(L);
    }
        
	int _wrap_method_Body_getVelocity(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pBody p = mod_to_body(L, 1);
        lua_remove(L, 1);
        return p->getVelocity(L);
    }
        
	int _wrap_method_Body_getWorldVector(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pBody p = mod_to_body(L, 1);
        lua_remove(L, 1);
        return p->getWorldVector(L);
    }
        
	int _wrap_method_Body_getWorldCenter(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pBody p = mod_to_body(L, 1);
        lua_remove(L, 1);
        return p->getWorldCenter(L);
    }
        
	int _wrap_method_Body_destroy(lua_State * L)        
	{
		if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
		love_box2d::pBody * p = mod_to_body_ptr(L, 1);
		
		// This will destroy memory if it's the last reference.
		p->reset();

		// Create the metatable.
		lua_newtable(L);
		lua_pushcfunction(L, __error_index);
		lua_setfield(L, -2, "__index");

		// Set the metatable.
		lua_setmetatable(L, -2);

		return 0;
	}
        
	bool mod_is_circleshape(lua_State * L, int idx)            
    {
        swig_lua_userdata* usr = 0;
        swig_cast_info *cast = 0;
        usr=(swig_lua_userdata*)lua_touserdata(L,idx);
        if(!usr) return false;
        cast=SWIG_TypeCheckStruct(usr->type,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t);
        if(cast) return true;
        return false;
    }
        
	boost::shared_ptr<CircleShape> mod_to_circleshape(lua_State * L, int idx)            
    {
        love_box2d::pCircleShape * arg;
        if(!lua_isuserdata(L,idx)) luaL_error(L, "Error, argument is not userdata.");
        if (!SWIG_IsOK(SWIG_ConvertPtr(L,idx,(void**)&arg,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,0))){
              luaL_error(L, "Error, argument is not type CircleShape.");
        }
        return *arg;
    }
        
	boost::shared_ptr<CircleShape> * mod_to_circleshape_ptr(lua_State * L, int idx)            
    {
        love_box2d::pCircleShape * arg;
        if(!lua_isuserdata(L,idx)) luaL_error(L, "Error, argument is not userdata.");
        if (!SWIG_IsOK(SWIG_ConvertPtr(L,idx,(void**)&arg,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,0))){
              luaL_error(L, "Error, argument is not type CircleShape.");
        }
        return arg;
    }
        
	void mod_push_circleshape(lua_State * L, boost::shared_ptr<CircleShape> circleshape)            
    {
        love_box2d::pCircleShape * resultptr = new love_box2d::pCircleShape((love_box2d::pCircleShape &) circleshape);
        SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__CircleShape_t,1);
    }
        
	int _wrap_method_CircleShape_getCategory(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pCircleShape p = mod_to_circleshape(L, 1);
        lua_remove(L, 1);
        return p->getCategory(L);
    }
        
	int _wrap_method_CircleShape_getData(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pCircleShape p = mod_to_circleshape(L, 1);
        lua_remove(L, 1);
        return p->getData(L);
    }
        
	int _wrap_method_CircleShape_testSegment(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pCircleShape p = mod_to_circleshape(L, 1);
        lua_remove(L, 1);
        return p->testSegment(L);
    }
        
	int _wrap_method_CircleShape_getBoundingBox(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pCircleShape p = mod_to_circleshape(L, 1);
        lua_remove(L, 1);
        return p->getBoundingBox(L);
    }
        
	int _wrap_method_CircleShape_setCategory(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pCircleShape p = mod_to_circleshape(L, 1);
        lua_remove(L, 1);
        return p->setCategory(L);
    }
        
	int _wrap_method_CircleShape_setData(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pCircleShape p = mod_to_circleshape(L, 1);
        lua_remove(L, 1);
        return p->setData(L);
    }
        
	int _wrap_method_CircleShape_getMask(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pCircleShape p = mod_to_circleshape(L, 1);
        lua_remove(L, 1);
        return p->getMask(L);
    }
        
	int _wrap_method_CircleShape_setMask(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pCircleShape p = mod_to_circleshape(L, 1);
        lua_remove(L, 1);
        return p->setMask(L);
    }
        
	int _wrap_method_CircleShape_destroy(lua_State * L)        
	{
		if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
		love_box2d::pCircleShape * p = mod_to_circleshape_ptr(L, 1);
		
		// This will destroy memory if it's the last reference.
		p->reset();

		// Create the metatable.
		lua_newtable(L);
		lua_pushcfunction(L, __error_index);
		lua_setfield(L, -2, "__index");

		// Set the metatable.
		lua_setmetatable(L, -2);

		return 0;
	}
        
	bool mod_is_prismaticjoint(lua_State * L, int idx)            
    {
        swig_lua_userdata* usr = 0;
        swig_cast_info *cast = 0;
        usr=(swig_lua_userdata*)lua_touserdata(L,idx);
        if(!usr) return false;
        cast=SWIG_TypeCheckStruct(usr->type,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t);
        if(cast) return true;
        return false;
    }
        
	boost::shared_ptr<PrismaticJoint> mod_to_prismaticjoint(lua_State * L, int idx)            
    {
        love_box2d::pPrismaticJoint * arg;
        if(!lua_isuserdata(L,idx)) luaL_error(L, "Error, argument is not userdata.");
        if (!SWIG_IsOK(SWIG_ConvertPtr(L,idx,(void**)&arg,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,0))){
              luaL_error(L, "Error, argument is not type PrismaticJoint.");
        }
        return *arg;
    }
        
	boost::shared_ptr<PrismaticJoint> * mod_to_prismaticjoint_ptr(lua_State * L, int idx)            
    {
        love_box2d::pPrismaticJoint * arg;
        if(!lua_isuserdata(L,idx)) luaL_error(L, "Error, argument is not userdata.");
        if (!SWIG_IsOK(SWIG_ConvertPtr(L,idx,(void**)&arg,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,0))){
              luaL_error(L, "Error, argument is not type PrismaticJoint.");
        }
        return arg;
    }
        
	void mod_push_prismaticjoint(lua_State * L, boost::shared_ptr<PrismaticJoint> prismaticjoint)            
    {
        love_box2d::pPrismaticJoint * resultptr = new love_box2d::pPrismaticJoint((love_box2d::pPrismaticJoint &) prismaticjoint);
        SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__PrismaticJoint_t,1);
    }
        
	int _wrap_method_PrismaticJoint_getLimits(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pPrismaticJoint p = mod_to_prismaticjoint(L, 1);
        lua_remove(L, 1);
        return p->getLimits(L);
    }
        
	int _wrap_method_PrismaticJoint_getReactionForce(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pPrismaticJoint p = mod_to_prismaticjoint(L, 1);
        lua_remove(L, 1);
        return p->getReactionForce(L);
    }
        
	int _wrap_method_PrismaticJoint_getAnchors(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pPrismaticJoint p = mod_to_prismaticjoint(L, 1);
        lua_remove(L, 1);
        return p->getAnchors(L);
    }
        
	int _wrap_method_PrismaticJoint_destroy(lua_State * L)        
	{
		if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
		love_box2d::pPrismaticJoint * p = mod_to_prismaticjoint_ptr(L, 1);
		
		// This will destroy memory if it's the last reference.
		p->reset();

		// Create the metatable.
		lua_newtable(L);
		lua_pushcfunction(L, __error_index);
		lua_setfield(L, -2, "__index");

		// Set the metatable.
		lua_setmetatable(L, -2);

		return 0;
	}
        
	bool mod_is_revolutejoint(lua_State * L, int idx)            
    {
        swig_lua_userdata* usr = 0;
        swig_cast_info *cast = 0;
        usr=(swig_lua_userdata*)lua_touserdata(L,idx);
        if(!usr) return false;
        cast=SWIG_TypeCheckStruct(usr->type,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t);
        if(cast) return true;
        return false;
    }
        
	boost::shared_ptr<RevoluteJoint> mod_to_revolutejoint(lua_State * L, int idx)            
    {
        love_box2d::pRevoluteJoint * arg;
        if(!lua_isuserdata(L,idx)) luaL_error(L, "Error, argument is not userdata.");
        if (!SWIG_IsOK(SWIG_ConvertPtr(L,idx,(void**)&arg,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,0))){
              luaL_error(L, "Error, argument is not type RevoluteJoint.");
        }
        return *arg;
    }
        
	boost::shared_ptr<RevoluteJoint> * mod_to_revolutejoint_ptr(lua_State * L, int idx)            
    {
        love_box2d::pRevoluteJoint * arg;
        if(!lua_isuserdata(L,idx)) luaL_error(L, "Error, argument is not userdata.");
        if (!SWIG_IsOK(SWIG_ConvertPtr(L,idx,(void**)&arg,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,0))){
              luaL_error(L, "Error, argument is not type RevoluteJoint.");
        }
        return arg;
    }
        
	void mod_push_revolutejoint(lua_State * L, boost::shared_ptr<RevoluteJoint> revolutejoint)            
    {
        love_box2d::pRevoluteJoint * resultptr = new love_box2d::pRevoluteJoint((love_box2d::pRevoluteJoint &) revolutejoint);
        SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__RevoluteJoint_t,1);
    }
        
	int _wrap_method_RevoluteJoint_getLimits(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pRevoluteJoint p = mod_to_revolutejoint(L, 1);
        lua_remove(L, 1);
        return p->getLimits(L);
    }
        
	int _wrap_method_RevoluteJoint_getReactionForce(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pRevoluteJoint p = mod_to_revolutejoint(L, 1);
        lua_remove(L, 1);
        return p->getReactionForce(L);
    }
        
	int _wrap_method_RevoluteJoint_getAnchors(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pRevoluteJoint p = mod_to_revolutejoint(L, 1);
        lua_remove(L, 1);
        return p->getAnchors(L);
    }
        
	int _wrap_method_RevoluteJoint_destroy(lua_State * L)        
	{
		if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
		love_box2d::pRevoluteJoint * p = mod_to_revolutejoint_ptr(L, 1);
		
		// This will destroy memory if it's the last reference.
		p->reset();

		// Create the metatable.
		lua_newtable(L);
		lua_pushcfunction(L, __error_index);
		lua_setfield(L, -2, "__index");

		// Set the metatable.
		lua_setmetatable(L, -2);

		return 0;
	}
        
	bool mod_is_mousejoint(lua_State * L, int idx)            
    {
        swig_lua_userdata* usr = 0;
        swig_cast_info *cast = 0;
        usr=(swig_lua_userdata*)lua_touserdata(L,idx);
        if(!usr) return false;
        cast=SWIG_TypeCheckStruct(usr->type,SWIGTYPE_p_boost__shared_ptrT_love_box2d__MouseJoint_t);
        if(cast) return true;
        return false;
    }
        
	boost::shared_ptr<MouseJoint> mod_to_mousejoint(lua_State * L, int idx)            
    {
        love_box2d::pMouseJoint * arg;
        if(!lua_isuserdata(L,idx)) luaL_error(L, "Error, argument is not userdata.");
        if (!SWIG_IsOK(SWIG_ConvertPtr(L,idx,(void**)&arg,SWIGTYPE_p_boost__shared_ptrT_love_box2d__MouseJoint_t,0))){
              luaL_error(L, "Error, argument is not type MouseJoint.");
        }
        return *arg;
    }
        
	boost::shared_ptr<MouseJoint> * mod_to_mousejoint_ptr(lua_State * L, int idx)            
    {
        love_box2d::pMouseJoint * arg;
        if(!lua_isuserdata(L,idx)) luaL_error(L, "Error, argument is not userdata.");
        if (!SWIG_IsOK(SWIG_ConvertPtr(L,idx,(void**)&arg,SWIGTYPE_p_boost__shared_ptrT_love_box2d__MouseJoint_t,0))){
              luaL_error(L, "Error, argument is not type MouseJoint.");
        }
        return arg;
    }
        
	void mod_push_mousejoint(lua_State * L, boost::shared_ptr<MouseJoint> mousejoint)            
    {
        love_box2d::pMouseJoint * resultptr = new love_box2d::pMouseJoint((love_box2d::pMouseJoint &) mousejoint);
        SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__MouseJoint_t,1);
    }
        
	int _wrap_method_MouseJoint_getReactionForce(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pMouseJoint p = mod_to_mousejoint(L, 1);
        lua_remove(L, 1);
        return p->getReactionForce(L);
    }
        
	int _wrap_method_MouseJoint_getTarget(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pMouseJoint p = mod_to_mousejoint(L, 1);
        lua_remove(L, 1);
        return p->getTarget(L);
    }
        
	int _wrap_method_MouseJoint_getAnchors(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pMouseJoint p = mod_to_mousejoint(L, 1);
        lua_remove(L, 1);
        return p->getAnchors(L);
    }
        
	int _wrap_method_MouseJoint_destroy(lua_State * L)        
	{
		if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
		love_box2d::pMouseJoint * p = mod_to_mousejoint_ptr(L, 1);
		
		// This will destroy memory if it's the last reference.
		p->reset();

		// Create the metatable.
		lua_newtable(L);
		lua_pushcfunction(L, __error_index);
		lua_setfield(L, -2, "__index");

		// Set the metatable.
		lua_setmetatable(L, -2);

		return 0;
	}
        
	bool mod_is_joint(lua_State * L, int idx)            
    {
        swig_lua_userdata* usr = 0;
        swig_cast_info *cast = 0;
        usr=(swig_lua_userdata*)lua_touserdata(L,idx);
        if(!usr) return false;
        cast=SWIG_TypeCheckStruct(usr->type,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Joint_t);
        if(cast) return true;
        return false;
    }
        
	boost::shared_ptr<Joint> mod_to_joint(lua_State * L, int idx)            
    {
        love_box2d::pJoint * arg;
        if(!lua_isuserdata(L,idx)) luaL_error(L, "Error, argument is not userdata.");
        if (!SWIG_IsOK(SWIG_ConvertPtr(L,idx,(void**)&arg,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Joint_t,0))){
              luaL_error(L, "Error, argument is not type Joint.");
        }
        return *arg;
    }
        
	boost::shared_ptr<Joint> * mod_to_joint_ptr(lua_State * L, int idx)            
    {
        love_box2d::pJoint * arg;
        if(!lua_isuserdata(L,idx)) luaL_error(L, "Error, argument is not userdata.");
        if (!SWIG_IsOK(SWIG_ConvertPtr(L,idx,(void**)&arg,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Joint_t,0))){
              luaL_error(L, "Error, argument is not type Joint.");
        }
        return arg;
    }
        
	void mod_push_joint(lua_State * L, boost::shared_ptr<Joint> joint)            
    {
        love_box2d::pJoint * resultptr = new love_box2d::pJoint((love_box2d::pJoint &) joint);
        SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Joint_t,1);
    }
        
	bool mod_is_contact(lua_State * L, int idx)            
    {
        swig_lua_userdata* usr = 0;
        swig_cast_info *cast = 0;
        usr=(swig_lua_userdata*)lua_touserdata(L,idx);
        if(!usr) return false;
        cast=SWIG_TypeCheckStruct(usr->type,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Contact_t);
        if(cast) return true;
        return false;
    }
        
	boost::shared_ptr<Contact> mod_to_contact(lua_State * L, int idx)            
    {
        love_box2d::pContact * arg;
        if(!lua_isuserdata(L,idx)) luaL_error(L, "Error, argument is not userdata.");
        if (!SWIG_IsOK(SWIG_ConvertPtr(L,idx,(void**)&arg,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Contact_t,0))){
              luaL_error(L, "Error, argument is not type Contact.");
        }
        return *arg;
    }
        
	boost::shared_ptr<Contact> * mod_to_contact_ptr(lua_State * L, int idx)            
    {
        love_box2d::pContact * arg;
        if(!lua_isuserdata(L,idx)) luaL_error(L, "Error, argument is not userdata.");
        if (!SWIG_IsOK(SWIG_ConvertPtr(L,idx,(void**)&arg,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Contact_t,0))){
              luaL_error(L, "Error, argument is not type Contact.");
        }
        return arg;
    }
        
	void mod_push_contact(lua_State * L, boost::shared_ptr<Contact> contact)            
    {
        love_box2d::pContact * resultptr = new love_box2d::pContact((love_box2d::pContact &) contact);
        SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__Contact_t,1);
    }
        
	int _wrap_method_Contact_getPosition(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pContact p = mod_to_contact(L, 1);
        lua_remove(L, 1);
        return p->getPosition(L);
    }
        
	int _wrap_method_Contact_getVelocity(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pContact p = mod_to_contact(L, 1);
        lua_remove(L, 1);
        return p->getVelocity(L);
    }
        
	int _wrap_method_Contact_getNormal(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pContact p = mod_to_contact(L, 1);
        lua_remove(L, 1);
        return p->getNormal(L);
    }
        
	bool mod_is_distancejoint(lua_State * L, int idx)            
    {
        swig_lua_userdata* usr = 0;
        swig_cast_info *cast = 0;
        usr=(swig_lua_userdata*)lua_touserdata(L,idx);
        if(!usr) return false;
        cast=SWIG_TypeCheckStruct(usr->type,SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t);
        if(cast) return true;
        return false;
    }
        
	boost::shared_ptr<DistanceJoint> mod_to_distancejoint(lua_State * L, int idx)            
    {
        love_box2d::pDistanceJoint * arg;
        if(!lua_isuserdata(L,idx)) luaL_error(L, "Error, argument is not userdata.");
        if (!SWIG_IsOK(SWIG_ConvertPtr(L,idx,(void**)&arg,SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t,0))){
              luaL_error(L, "Error, argument is not type DistanceJoint.");
        }
        return *arg;
    }
        
	boost::shared_ptr<DistanceJoint> * mod_to_distancejoint_ptr(lua_State * L, int idx)            
    {
        love_box2d::pDistanceJoint * arg;
        if(!lua_isuserdata(L,idx)) luaL_error(L, "Error, argument is not userdata.");
        if (!SWIG_IsOK(SWIG_ConvertPtr(L,idx,(void**)&arg,SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t,0))){
              luaL_error(L, "Error, argument is not type DistanceJoint.");
        }
        return arg;
    }
        
	void mod_push_distancejoint(lua_State * L, boost::shared_ptr<DistanceJoint> distancejoint)            
    {
        love_box2d::pDistanceJoint * resultptr = new love_box2d::pDistanceJoint((love_box2d::pDistanceJoint &) distancejoint);
        SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__DistanceJoint_t,1);
    }
        
	int _wrap_method_DistanceJoint_getReactionForce(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pDistanceJoint p = mod_to_distancejoint(L, 1);
        lua_remove(L, 1);
        return p->getReactionForce(L);
    }
        
	int _wrap_method_DistanceJoint_getAnchors(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pDistanceJoint p = mod_to_distancejoint(L, 1);
        lua_remove(L, 1);
        return p->getAnchors(L);
    }
        
	int _wrap_method_DistanceJoint_destroy(lua_State * L)        
	{
		if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
		love_box2d::pDistanceJoint * p = mod_to_distancejoint_ptr(L, 1);
		
		// This will destroy memory if it's the last reference.
		p->reset();

		// Create the metatable.
		lua_newtable(L);
		lua_pushcfunction(L, __error_index);
		lua_setfield(L, -2, "__index");

		// Set the metatable.
		lua_setmetatable(L, -2);

		return 0;
	}
        
	bool mod_is_world(lua_State * L, int idx)            
    {
        swig_lua_userdata* usr = 0;
        swig_cast_info *cast = 0;
        usr=(swig_lua_userdata*)lua_touserdata(L,idx);
        if(!usr) return false;
        cast=SWIG_TypeCheckStruct(usr->type,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t);
        if(cast) return true;
        return false;
    }
        
	boost::shared_ptr<World> mod_to_world(lua_State * L, int idx)            
    {
        love_box2d::pWorld * arg;
        if(!lua_isuserdata(L,idx)) luaL_error(L, "Error, argument is not userdata.");
        if (!SWIG_IsOK(SWIG_ConvertPtr(L,idx,(void**)&arg,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t,0))){
              luaL_error(L, "Error, argument is not type World.");
        }
        return *arg;
    }
        
	boost::shared_ptr<World> * mod_to_world_ptr(lua_State * L, int idx)            
    {
        love_box2d::pWorld * arg;
        if(!lua_isuserdata(L,idx)) luaL_error(L, "Error, argument is not userdata.");
        if (!SWIG_IsOK(SWIG_ConvertPtr(L,idx,(void**)&arg,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t,0))){
              luaL_error(L, "Error, argument is not type World.");
        }
        return arg;
    }
        
	void mod_push_world(lua_State * L, boost::shared_ptr<World> world)            
    {
        love_box2d::pWorld * resultptr = new love_box2d::pWorld((love_box2d::pWorld &) world);
        SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_boost__shared_ptrT_love_box2d__World_t,1);
    }
        
	int _wrap_method_World_getGravity(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pWorld p = mod_to_world(L, 1);
        lua_remove(L, 1);
        return p->getGravity(L);
    }
        
	int _wrap_method_World_getCallback(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pWorld p = mod_to_world(L, 1);
        lua_remove(L, 1);
        return p->getCallback(L);
    }
        
	int _wrap_method_World_setCallback(lua_State * L)        
    {
        if(lua_gettop(L) < 1) return luaL_error(L, "Incorrect number of parameters.");
        love_box2d::pWorld p = mod_to_world(L, 1);
        lua_remove(L, 1);
        return p->setCallback(L);
    }
        
}

